PHP Class CacheFile, thinksns

Inheritance: extends Cache
Show file Open project: medz/thinksns-4 Class Usage Examples

Public Methods

Method Description
__construct ( $options = [] ) 架构函数
clear ( ) : boolen 清除缓存
get ( string $name ) : mixed 读取缓存
rm ( string $name ) : boolen 删除缓存
set ( string $name, mixed $value, integer $expire = null ) : boolen 写入缓存

Private Methods

Method Description
filename ( string $name ) : string 取得变量的存储文件名
init ( ) : boolen 初始化检查

Method Details

__construct() public method

架构函数
public __construct ( $options = [] )

clear() public method

清除缓存
public clear ( ) : boolen
return boolen

get() public method

读取缓存
public get ( string $name ) : mixed
$name string 缓存变量名
return mixed

rm() public method

删除缓存
public rm ( string $name ) : boolen
$name string 缓存变量名
return boolen

set() public method

写入缓存
public set ( string $name, mixed $value, integer $expire = null ) : boolen
$name string 缓存变量名
$value mixed 存储数据
$expire integer 有效时间 0为永久
return boolen