Chris@0: entityTypeManager = $entity_type_manager; Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: protected function resolveCacheMiss($key) { Chris@0: $ids = $this->entityTypeManager->getStorage('block_content')->getQuery() Chris@0: ->condition('uuid', $key) Chris@0: ->execute(); Chris@0: Chris@0: // Only cache if there is a match, otherwise creating new entities would Chris@0: // require to invalidate the cache. Chris@0: $id = reset($ids); Chris@0: if ($id) { Chris@0: $this->storage[$key] = $id; Chris@0: $this->persist($key); Chris@0: } Chris@0: return $id; Chris@0: } Chris@0: Chris@0: }