yii\caching\Cache::delete PHP Method

delete() public method

Deletes a value with the specified key from cache
public delete ( mixed $key ) : boolean
$key mixed a key identifying the value to be deleted from cache. This can be a simple string or a complex data structure consisting of factors representing the key.
return boolean if no error happens during deletion
    public function delete($key)
    {
        $key = $this->buildKey($key);
        return $this->deleteValue($key);
    }

Usage Example

Example #1
0
 /**
  * @inheritdoc
  */
 protected function releaseLock($name)
 {
     if (!$this->cache instanceof Cache) {
         return false;
     }
     return $this->cache->delete($this->getCacheKey($name));
 }
All Usage Examples Of yii\caching\Cache::delete