// +---------------------------------------------------------------------- namespace think\cache\driver; use think\cache\Driver; use think\Container; /** * 文件类型缓存类 * @author liu21st */ class Test extends Driver { protected $options = [ 'expire' => 0, 'cache_subdir' => true, 'prefix' => '', 'path' => '', 'hash_type' => 'md5', 'data_compress' => false, 'serialize' => true, ]; protected $expire; /** * 架构函数 * @param array $options */ public function __construct($options = []) { return false; } /** * 初始化检查 * @access private * @return boolean */ private function init() { // 创建项目缓存目录 try { if (!is_dir($this->options['path']) && mkdir($this->options['path'], 0755, true)) { return true; } } catch (\Exception $e) { } return false; } }