Defines a stub cache implementation.
The stub implementation is needed when database access is not yet available. Because Drupal's caching system never requires that cached data be present, these stub functions can short-circuit the process and sidestep the need for any persistent storage. Using this cache implementation during normal operations would have a negative impact on performance.
This also can be used for testing purposes.
Name | Modifiers | Type | Description |
---|---|---|---|
CacheBackendInterface::CACHE_PERMANENT | constant | Indicates that the item should never be removed unless explicitly deleted. | |
NullBackend::delete | public | function | Deletes an item from the cache. Overrides CacheBackendInterface::delete |
NullBackend::deleteAll | public | function | Deletes all cache items in a bin. Overrides CacheBackendInterface::deleteAll |
NullBackend::deleteMultiple | public | function | Deletes multiple items from the cache. Overrides CacheBackendInterface::deleteMultiple |
NullBackend::garbageCollection | public | function | Performs garbage collection on a cache bin. Overrides CacheBackendInterface::garbageCollection |
NullBackend::get | public | function | Returns data from the persistent cache. Overrides CacheBackendInterface::get |
NullBackend::getMultiple | public | function | Returns data from the persistent cache when given an array of cache IDs. Overrides CacheBackendInterface::getMultiple |
NullBackend::invalidate | public | function | Marks a cache item as invalid. Overrides CacheBackendInterface::invalidate |
NullBackend::invalidateAll | public | function | Marks all cache items as invalid. Overrides CacheBackendInterface::invalidateAll |
NullBackend::invalidateMultiple | public | function | Marks cache items as invalid. Overrides CacheBackendInterface::invalidateMultiple |
NullBackend::removeBin | public | function | Remove a cache bin. Overrides CacheBackendInterface::removeBin |
NullBackend::set | public | function | Stores data in the persistent cache. Overrides CacheBackendInterface::set |
NullBackend::setMultiple | public | function | Store multiple items in the persistent cache. Overrides CacheBackendInterface::setMultiple |
NullBackend::__construct | public | function | Constructs a NullBackend object. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!NullBackend.php/class/NullBackend/8.1.x