interface MemoryCacheInterface

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheInterface.php \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface
  2. 8.9.x core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheInterface.php \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface
  3. 11.x 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

  • interface \Drupal\Core\Cache\CacheBackendInterface
    • interface \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface extends \Drupal\Core\Cache\CacheBackendInterface \Drupal\Core\Cache\CacheTagsInvalidatorInterface

Expanded class hierarchy of MemoryCacheInterface

All classes that implement MemoryCacheInterface

Related topics

13 files declare their use of MemoryCacheInterface
BaseFieldOverrideStorage.php in core/lib/Drupal/Core/Field/BaseFieldOverrideStorage.php
CacheFactoryDecorator.php in core/modules/system/tests/modules/performance_test/src/Cache/CacheFactoryDecorator.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

... See full list

2 string references to 'MemoryCacheInterface'
book.services.yml in core/modules/book/book.services.yml
core/modules/book/book.services.yml
jsonapi.services.yml in core/modules/jsonapi/jsonapi.services.yml
core/modules/jsonapi/jsonapi.services.yml
2 services use MemoryCacheInterface
book.memory_cache in core/modules/book/book.services.yml
Drupal\Core\Cache\MemoryCache\MemoryCacheInterface
cache.jsonapi_memory in core/modules/jsonapi/jsonapi.services.yml
Drupal\Core\Cache\MemoryCache\MemoryCacheInterface

File

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

Namespace

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

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.