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