diff --git a/core/core.services.yml b/core/core.services.yml index e934e48..274041b 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -202,6 +202,7 @@ services: tags: - { name: cache.bin, default_backend: cache.backend.memory } factory: cache_factory:get + arguments: [static] cache.bootstrap: class: Drupal\Core\Cache\CacheBackendInterface tags: diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php index 39fc525..d4d353d 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php @@ -174,7 +174,7 @@ protected function getFromStaticCache(array $ids) { protected function setStaticCache(array $entities) { if ($this->entityType->isStaticallyCacheable()) { foreach ($entities as $id => $entity) { - $this->staticCache->set($this->getCacheId($entity->id()), $entity, $this->staticCache::CACHE_PERMANENT, ['entity_static_cache']); + $this->staticCache->set($this->getCacheId($entity->id()), $entity, Cache::CACHE_PERMANENT, ['entity_static_cache']); } } }