Beispiel #1
0
 /**
  * @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());
     }
 }
Beispiel #2
0
 public function getAggregateCacheKeyByParentAndChildEntity(Entity $parent, Entity $child, $prefix = '', $aggregateCachePrefix)
 {
     $cacheKey = $this->getAggregateCacheKeyByParentEntity($parent, $child->getId(), $aggregateCachePrefix) . CacheProvider::KEY_DELIMITER . $prefix;
     return $cacheKey;
 }
Beispiel #3
0
 /**
  * @param Entity $entity
  */
 public function deleteEntity(Entity $entity)
 {
     $this->delete($entity->getCacheKey());
     $this->packer->resetTags($entity->getCacheTags());
 }