public function remove(string $key)
  {
    $file = $this->file;

    if (file_exists($file)) {
      $data = unserialize($this->decrypt(file_get_contents($file)));

      if (is_array($data) && isset($data[$key])) {
        unset($data[$key]);
        $data = $this->encrypt(serialize($data));
        return file_put_contents($file, $data);
      }
    }

    return false;
  }
public function remove(string $key)
  {
    $file = $this->file;

    if (file_exists($file)) {
      $data = unserialize($this->decrypt(file_get_contents($file)));

      if (is_array($data) && isset($data[$key])) {
        unset($data[$key]);
        $data = $this->encrypt(serialize($data));
        return file_put_contents($file, $data);
      }
    }

    return false;
  }
public function remove ( string $ key ) { $ file = $ this -> file ; if ( file_exists ( $ file ) ) { $ data = unserialize ( $ this -> decrypt ( file_get_contents ( $ file ) ) ) ; if ( is_array ( $ data ) && isset ( $ data [ $ key ] ) ) { unset ( $ data [ $ key ] ) ; $ data = $ this -> encrypt ( serialize ( $ data ) ) ; return file_put_contents ( $ file , $ data ) ; } } return false ; }
Remove key from cache file

@param string $key
@return mixed
Remove key from cache file