You are here

interface MemoryCacheInterface in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheInterface.php \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface
  2. 10 core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheInterface.php \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface

Defines an interface for memory cache implementations.

This has additional requirements over CacheBackendInterface and CacheTagsInvalidatorInterface. Objects stored must be the same instance when retrieved from cache, so that this can be used as a replacement for protected properties and similar.

Hierarchy

Expanded class hierarchy of MemoryCacheInterface

All classes that implement MemoryCacheInterface

Related topics

11 files declare their use of MemoryCacheInterface
BaseFieldOverrideStorage.php in core/lib/Drupal/Core/Field/BaseFieldOverrideStorage.php
CommentStorage.php in core/modules/comment/src/CommentStorage.php
ConfigEntityStorage.php in core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
ContentEntityStorageBase.php in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
EntityStorageBase.php in core/lib/Drupal/Core/Entity/EntityStorageBase.php

... See full list

File

core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheInterface.php, line 18

Namespace

Drupal\Core\Cache\MemoryCache
View source
interface MemoryCacheInterface extends CacheBackendInterface, CacheTagsInvalidatorInterface {

}

Members

Namesort descending Modifiers Type Description Overrides
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. 7
CacheBackendInterface::deleteAll public function Deletes all cache items in a bin. 7
CacheBackendInterface::deleteMultiple public function Deletes multiple items from the cache. 7
CacheBackendInterface::garbageCollection public function Performs garbage collection on a cache bin. 7
CacheBackendInterface::get public function Returns data from the persistent cache. 7
CacheBackendInterface::getMultiple public function Returns data from the persistent cache when given an array of cache IDs. 7
CacheBackendInterface::invalidate public function Marks a cache item as invalid. 7
CacheBackendInterface::invalidateAll public function Marks all cache items as invalid. 7
CacheBackendInterface::invalidateMultiple public function Marks cache items as invalid. 7
CacheBackendInterface::removeBin public function Remove a cache bin. 7
CacheBackendInterface::set public function Stores data in the persistent cache. 7
CacheBackendInterface::setMultiple public function Store multiple items in the persistent cache. 7
CacheTagsInvalidatorInterface::invalidateTags public function Marks cache items with any of the specified tags as invalid. 4