getEntityManager(); return $em->getConfiguration()->getResultCacheImpl(); } /** * Return the processed entity cache suffix * @param EventArgs $args * @return string * @throws \Exception */ protected function getEntityCacheSuffix(EventArgs $args) { $entity = new \ReflectionClass(get_class($args->getEntity())); if (!$entity->hasConstant("CACHE_SUFFIX")) { throw new \Exception(sprintf("Missing cache suffix for %s entity", $entity->getName())); } return $entity->getConstant("CACHE_SUFFIX"); } /** * The executed process for clearing cache * @return void */ abstract public function process(EventArgs $args); }