Defines the cached storage.
The class gets another storage and a cache backend injected. It reads from the cache and delegates the read to the storage on a cache miss. It also handles cache invalidation.
Hierarchy
- class \Drupal\Core\Config\CachedStorage implements StorageCacheInterface, StorageInterface uses DependencySerializationTrait
File
- core/lib/Drupal/Core/Config/CachedStorage.php, line 15
Namespace
Drupal\Core\Config
Members
Name | Modifiers | Type | Description |
---|---|---|---|
CachedStorage::$cache | protected | property | The instantiated Cache backend. |
CachedStorage::$findByPrefixCache | protected | property | List of listAll() prefixes with their results. |
CachedStorage::$storage | protected | property | The configuration storage to be cached. |
CachedStorage::createCollection | public | function | Creates a collection on the storage. Overrides StorageInterface::createCollection |
CachedStorage::decode | public | function | Decodes configuration data from the storage-specific format. Overrides StorageInterface::decode |
CachedStorage::delete | public | function | Deletes a configuration object from the storage. Overrides StorageInterface::delete |
CachedStorage::deleteAll | public | function | Deletes configuration objects whose names start with a given prefix. Overrides StorageInterface::deleteAll |
CachedStorage::encode | public | function | Encodes configuration data into the storage-specific format. Overrides StorageInterface::encode |
CachedStorage::exists | public | function | Returns whether a configuration object exists. Overrides StorageInterface::exists |
CachedStorage::findByPrefix | protected | function | Finds configuration object names starting with a given prefix. |
CachedStorage::getAllCollectionNames | public | function | Gets the existing collections. Overrides StorageInterface::getAllCollectionNames |
CachedStorage::getCacheKey | protected | function | Returns a cache key for a configuration name using the collection. |
CachedStorage::getCacheKeys | protected | function | Returns a cache key map for an array of configuration names. |
CachedStorage::getCollectionName | public | function | Gets the name of the current collection the storage is using. Overrides StorageInterface::getCollectionName |
CachedStorage::getCollectionPrefix | protected | function | Returns a cache ID prefix to use for the collection. |
CachedStorage::listAll | public | function | Gets configuration object names starting with a given prefix. Overrides StorageInterface::listAll |
CachedStorage::read | public | function | Reads configuration data from the storage. Overrides StorageInterface::read |
CachedStorage::readMultiple | public | function | Reads configuration data from the storage. Overrides StorageInterface::readMultiple |
CachedStorage::rename | public | function | Renames a configuration object in the storage. Overrides StorageInterface::rename |
CachedStorage::resetListCache | public | function | Clears the static list cache. Overrides StorageCacheInterface::resetListCache |
CachedStorage::write | public | function | Writes configuration data to the storage. Overrides StorageInterface::write |
CachedStorage::__construct | public | function | Constructs a new CachedStorage. |
DependencySerializationTrait::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. |
DependencySerializationTrait::__sleep | public | function | |
DependencySerializationTrait::__wakeup | public | function | |
StorageInterface::DEFAULT_COLLECTION | constant | The default collection name. |
Please login to continue.