/** * @param array $uniqueKey * @param Entity $entity */ protected function createUniqueFieldsCache(Entity $entity, array $uniqueKey) { if ($this->hasUniqueFields()) { $key = $entity->getCacheKeyByUniqueFields($uniqueKey); Manager::getInstance()->getCache()->setRaw($key, $entity->getId()); } }
public function getAggregateCacheKeyByParentAndChildEntity(Entity $parent, Entity $child, $prefix = '', $aggregateCachePrefix) { $cacheKey = $this->getAggregateCacheKeyByParentEntity($parent, $child->getId(), $aggregateCachePrefix) . CacheProvider::KEY_DELIMITER . $prefix; return $cacheKey; }
/** * @param Entity $entity */ public function deleteEntity(Entity $entity) { $this->delete($entity->getCacheKey()); $this->packer->resetTags($entity->getCacheTags()); }