Defines an interface for cache implementations.
All cache implementations have to implement this interface. Drupal\Core\Cache\DatabaseBackend provides the default implementation, which can be consulted as an example.
The cache indentifiers are case sensitive.
Hierarchy
- interface \Drupal\Core\Cache\CacheBackendInterface
Related topics
- Cache API
- Information about the Drupal Cache API
File
- core/lib/Drupal/Core/Cache/CacheBackendInterface.php, line 16
Namespace
Drupal\Core\Cache
Members
Name | Modifiers | Type | Description |
---|---|---|---|
CacheBackendInterface::CACHE_PERMANENT | constant | Indicates that the item should never be removed unless explicitly deleted. | |
CacheBackendInterface::delete | public | function | Deletes an item from the cache. |
CacheBackendInterface::deleteAll | public | function | Deletes all cache items in a bin. |
CacheBackendInterface::deleteMultiple | public | function | Deletes multiple items from the cache. |
CacheBackendInterface::garbageCollection | public | function | Performs garbage collection on a cache bin. |
CacheBackendInterface::get | public | function | Returns data from the persistent cache. |
CacheBackendInterface::getMultiple | public | function | Returns data from the persistent cache when given an array of cache IDs. |
CacheBackendInterface::invalidate | public | function | Marks a cache item as invalid. |
CacheBackendInterface::invalidateAll | public | function | Marks all cache items as invalid. |
CacheBackendInterface::invalidateMultiple | public | function | Marks cache items as invalid. |
CacheBackendInterface::removeBin | public | function | Remove a cache bin. |
CacheBackendInterface::set | public | function | Stores data in the persistent cache. |
CacheBackendInterface::setMultiple | public | function | Store multiple items in the persistent cache. |
Please login to continue.