/** * Remove a value from cache * * @param \Itkg\Core\CacheableInterface $item * @return void */ public function remove(CacheableInterface $item) { $this->getConnection()->delete($item->getHashKey()); }
/** * 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)); } }
/** * 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()]); } }
/** * Remove a value from cache * * @param \Itkg\Core\CacheableInterface $item * * @return void */ public function remove(CacheableInterface $item) { $this->provider->delete($item->getHashKey()); }