语法
Cache::has(string $key);
示例代码
<?phprequire '../vendor/autoload.php';use renpengpeng\Cache;Cache::connect(['type' => 'File','file' => ['cache_dir' => realpath(__DIR__).DIRECTORY_SEPARATOR.'cache']]);$has = Cache::has('cache');var_dump($has); // 返回结果:false
参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| key | string | 缓存的key |
