/**
  * {@inheritDoc}
  */
 public function loadMetadata($class)
 {
     $cacheKey = 'var_tag_validator.metadata:' . $class;
     if ($this->cache->has($cacheKey)) {
         return $this->cache->get($cacheKey);
     }
     $metadata = $this->delegate->loadMetadata($class);
     $this->cache->set($cacheKey, $metadata);
     return $metadata;
 }
 /**
  * {@inheritDoc}
  */
 public function extract(HandlerInterface $handler)
 {
     $cacheKey = $this->generateCacheKey($handler);
     $handlerDoc = $this->cache->get($cacheKey);
     if (!$handlerDoc) {
         $handlerDoc = $this->delegate->extract($handler);
         $this->cache->set($cacheKey, $handlerDoc);
     }
     return $handlerDoc;
 }
 /**
  * {@inheritDoc}
  */
 public function loadForMethod($class, $method, $group = Security::DEFAULT_GROUP)
 {
     $key = 'security.metadata.method:' . $class . ':' . $method . ':' . $group;
     $metadata = $this->cache->get($key);
     if (!$metadata) {
         $metadata = $this->delegate->loadForMethod($class, $method, $group);
         $this->cache->set($key, $metadata);
     }
     return $metadata;
 }
Example #4
0
 /**
  * {@inheritDoc}
  */
 public function loadActions()
 {
     $actions = $this->cache->get($this->key);
     if ($actions) {
         return $actions;
     }
     $actions = $this->loader->loadActions();
     $this->cache->set($this->key, $actions);
     return $actions;
 }
 /**
  * {@inheritDoc}
  */
 public function loadMetadata(\ReflectionParameter $parameter, \ReflectionFunctionAbstract $method)
 {
     $key = 'parameter.converter.orm.metadata:';
     $key .= KeyGenerator::generateForParameter($parameter, $method);
     $metadata = $this->cache->get($key);
     if (null === $metadata) {
         $metadata = $this->delegate->loadMetadata($parameter, $method);
         $this->cache->set($key, $metadata);
     }
     return $metadata;
 }
 /**
  * {@inheritDoc}
  */
 public function loadMetadata(\ReflectionProperty $property)
 {
     $key = 'property.converter.money.metadata:';
     $key .= KeyGenerator::generateForProperty($property);
     $metadata = $this->cache->get($key);
     if (null === $metadata) {
         $metadata = $this->delegate->loadMetadata($property);
         $this->cache->set($key, $metadata);
     }
     return $metadata;
 }
 /**
  * {@inheritDoc}
  */
 public function load($object, $group)
 {
     $class = get_class($object);
     $key = 'object_mapper:' . $class . ':' . $group;
     $metadata = $this->cache->get($key);
     if (!$metadata) {
         $metadata = $this->delegate->load($object, $group);
         $this->cache->set($key, $metadata);
     }
     return $metadata;
 }
 /**
  * {@inheritDoc}
  */
 public function loadMetadata($class)
 {
     if (is_object($class)) {
         $class = get_class($class);
     }
     $key = 'notifier:' . $class;
     $metadata = $this->cache->get($key);
     if (null === $metadata) {
         $metadata = $this->delegate->loadMetadata($class);
         $this->cache->set($key, $metadata);
     }
     return $metadata;
 }
 /**
  * {@inheritDoc}
  */
 public function fetch($id)
 {
     return $this->cache->get($id) ?: false;
 }
Example #10
0
 /**
  * {@inheritDoc}
  */
 public function fetch($key)
 {
     return $this->cache->get($key);
 }