You are here

public function EntityCache::__construct in Apigee Edge 8

EntityCache constructor.

Parameters

\Drupal\apigee_edge\MemoryCacheFactoryInterface $memory_cache_factory: The memory cache factory service.

\Drupal\apigee_edge\Entity\Controller\Cache\EntityIdCacheInterface $entity_id_cache: The related entity id cache.

string $entity_type: The entity type.

1 call to EntityCache::__construct()
DeveloperCache::__construct in src/Entity/Controller/Cache/DeveloperCache.php
DeveloperCache constructor.
1 method overrides EntityCache::__construct()
DeveloperCache::__construct in src/Entity/Controller/Cache/DeveloperCache.php
DeveloperCache constructor.

File

src/Entity/Controller/Cache/EntityCache.php, line 76

Class

EntityCache
Default entity cache implementation for controllers.

Namespace

Drupal\apigee_edge\Entity\Controller\Cache

Code

public function __construct(MemoryCacheFactoryInterface $memory_cache_factory, EntityIdCacheInterface $entity_id_cache, string $entity_type) {
  $this->cacheBackend = $memory_cache_factory
    ->get("{$entity_type}_entity_cache");
  $this->entityIdCache = $entity_id_cache;
}