Method | Description | |
---|---|---|
__construct ( string $cache_dir ) | ||
decrement ( $key, integer $value = 1 ) : mixed | 减法递增 | |
delTree ( $dir ) : boolean | 递归删除目录 | |
delete ( $key ) : boolean | 删除一个key,同事会删除缓存文件 | |
flush ( ) : mixed | 清楚所有缓存 | |
get ( string $key, string $default = null ) : mixed | get value by key, and check if it is expired | |
has ( $key ) : mixed | 判断Key是否存在 | |
increment ( $key, integer $value = 1 ) : mixed | 加法递增 | |
set ( string $key, mixed $value, integer $expire ) : mixed | 添加或覆盖一个key |
Method | Description | |
---|---|---|
checkExpire ( $cache_data ) : boolean | 检查key是否过期 | |
getItem ( $key ) : boolean | mixed | string | 获取含有元数据的信息 | |
path ( string $key ) : string | 根据key获取缓存文件路径 |
Method | Description | |
---|---|---|
createCacheFile ( $key ) : boolean | string | 创建缓存文件 | |
setItem ( $key, $value, $time, $expire ) : boolean | 设置包含元数据的信息 |
protected checkExpire ( $cache_data ) : boolean | ||
$cache_data | ||
return | boolean |