Jenner\SimpleFork\Cache\FileCache::delete PHP Method

delete() public method

删除一个key,同事会删除缓存文件
public delete ( $key ) : boolean
$key
return boolean
    public function delete($key)
    {
        $cache_file = $this->path($key);
        if (file_exists($cache_file)) {
            $unlink_result = unlink($cache_file);
            if ($unlink_result === false) {
                return false;
            }
        }
        return true;
    }