Exemplo n.º 1
0
Arquivo: Redis.php Projeto: itkg/core
 /**
  * Remove a value from cache
  *
  * @param \Itkg\Core\CacheableInterface $item
  * @return void
  */
 public function remove(CacheableInterface $item)
 {
     $this->getConnection()->delete($item->getHashKey());
 }
Exemplo n.º 2
0
 /**
  * Remove a value from cache
  *
  * @param \Itkg\Core\CacheableInterface $item
  *
  * @return void
  *
  * @throws \RuntimeException
  */
 public function remove(CacheableInterface $item)
 {
     $targetFile = $this->getTargetFile($item->getHashKey());
     if (file_exists($targetFile) && !unlink($targetFile)) {
         throw new \RuntimeException(sprintf('Unable to delete %s cache file', $targetFile));
     }
 }
Exemplo n.º 3
0
 /**
  * Remove a value from cache
  *
  * @param \Itkg\Core\CacheableInterface $item
  * @return void
  */
 public function remove(CacheableInterface $item)
 {
     if (isset($this->values[$item->getHashKey()])) {
         unset($this->values[$item->getHashKey()]);
     }
 }
Exemplo n.º 4
0
 /**
  * Remove a value from cache
  *
  * @param \Itkg\Core\CacheableInterface $item
  *
  * @return void
  */
 public function remove(CacheableInterface $item)
 {
     $this->provider->delete($item->getHashKey());
 }