public function erase($key) {
    $cacheData = $this->_loadCache();
    if (true === is_array($cacheData)) {
      if (true === isset($cacheData[$key])) {
        unset($cacheData[$key]);
        $cacheData = json_encode($cacheData);
        file_put_contents($this->getCacheDir(), $cacheData);
      } else {
        throw new Exception("Error: erase() - Key '{$key}' not found.");
      }
    }
    return $this;
  }
public function erase($key) {
    $cacheData = $this->_loadCache();
    if (true === is_array($cacheData)) {
      if (true === isset($cacheData[$key])) {
        unset($cacheData[$key]);
        $cacheData = json_encode($cacheData);
        file_put_contents($this->getCacheDir(), $cacheData);
      } else {
        throw new Exception("Error: erase() - Key '{$key}' not found.");
      }
    }
    return $this;
  }
public function erase ( $ key ) { $ cacheData = $ this -> _loadCache ( ) ; if ( true === is_array ( $ cacheData ) ) { if ( true === isset ( $ cacheData [ $ key ] ) ) { unset ( $ cacheData [ $ key ] ) ; $ cacheData = json_encode ( $ cacheData ) ; file_put_contents ( $ this -> getCacheDir ( ) , $ cacheData ) ; } else { throw new Exception ( "Error: erase() - Key '{$key}' not found." ) ; } } return $ this ; }
Erase cached entry by its key

@param string $key
@return object
Erase cached entry by its key