PHP Class FileStore, thinksns

Author: walkor ([email protected])
ファイルを表示 Open project: medz/thinksns-4 Class Usage Examples

Protected Properties

Property Type Description
$dataCache 为了避免频繁读取磁盘,增加了缓存机制
$dataFileHandle 打开文件的句柄
$lastCacheTime 上次缓存时间

Public Methods

Method Description
__construct ( 配置名 $config_name ) 构造函数
delete ( string $key ) : number 删除
destroy ( ) 清零销毁存储数据
get ( string $key, boolean $use_cache = true ) : Ambigous 读取
increment ( string $key ) : boolean | multitype: 自增
set ( string $key, mixed $value, integer $ttl ) : number 设置

Method Details

__construct() public method

构造函数
public __construct ( 配置名 $config_name )
$config_name 配置名

delete() public method

删除
public delete ( string $key ) : number
$key string
return number

destroy() public method

清零销毁存储数据
public destroy ( )

get() public method

读取
public get ( string $key, boolean $use_cache = true ) : Ambigous
$key string
$use_cache boolean
return Ambigous

increment() public method

自增
public increment ( string $key ) : boolean | multitype:
$key string
return boolean | multitype:

set() public method

设置
public set ( string $key, mixed $value, integer $ttl ) : number
$key string
$value mixed
$ttl integer
return number

Property Details

$dataCache protected_oe property

为了避免频繁读取磁盘,增加了缓存机制
protected $dataCache

$dataFileHandle protected_oe property

打开文件的句柄
protected $dataFileHandle

$lastCacheTime protected_oe property

上次缓存时间
protected $lastCacheTime