/**
  * {@inheritdoc}
  */
 public function resetCache(array $ids = NULL)
 {
     if ($ids) {
         $cids = array();
         foreach ($ids as $id) {
             unset($this->entities[$id]);
             $cids[] = $this->buildCacheId($id);
         }
         if ($this->entityType->isPersistentlyCacheable()) {
             $this->cacheBackend->deleteMultiple($cids);
         }
     } else {
         $this->entities = array();
         if ($this->entityType->isPersistentlyCacheable()) {
             $this->cacheBackend->deleteTags(array($this->entityTypeId . '_values' => TRUE));
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Resets metadata describing supported tokens.
  */
 public function resetInfo()
 {
     $this->tokenInfo = NULL;
     $this->cache->deleteTags(array(static::TOKEN_INFO_CACHE_TAG => TRUE));
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function deleteTags(array $tags)
 {
     $this->markAsOutdated();
     $this->consistentBackend->deleteTags($tags);
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function deleteTags(array $tags)
 {
     return $this->cacheBackend->deleteTags($tags);
 }