Jarves\Cache\Backend\AbstractCache::delete PHP Method

delete() public method

Deletes the cache for specified cache-key.
public delete ( string $key ) : boolean
$key string
return boolean
    public function delete($key)
    {
        unset($this->cache[$key]);
        return $this->doDelete($key);
    }

Usage Example

Beispiel #1
0
 /**
  * Deletes a distributed cache
  *
  * @param string $key
  */
 public function deleteDistributedCache($key)
 {
     $this->fastCache->delete($key);
     //whe need to invalidate this cache, so other jarves servers refresh their cache
     $this->distributedCache->invalidate($key);
 }