3 namespace Drupal\Core\Cache;
6 * Defines a stub cache implementation.
8 * The stub implementation is needed when database access is not yet available.
9 * Because Drupal's caching system never requires that cached data be present,
10 * these stub functions can short-circuit the process and sidestep the need for
11 * any persistent storage. Using this cache implementation during normal
12 * operations would have a negative impact on performance.
14 * This also can be used for testing purposes.
18 class NullBackend implements CacheBackendInterface {
21 * Constructs a NullBackend object.
24 * The cache bin for which the object is created.
26 public function __construct($bin) {}
31 public function get($cid, $allow_invalid = FALSE) {
38 public function getMultiple(&$cids, $allow_invalid = FALSE) {
45 public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = []) {}
50 public function setMultiple(array $items = []) {}
55 public function delete($cid) {}
60 public function deleteMultiple(array $cids) {}
65 public function deleteAll() {}
70 public function invalidate($cid) {}
75 public function invalidateMultiple(array $cids) {}
80 public function invalidateAll() {}
85 public function garbageCollection() {}
90 public function removeBin() {}