PHP Class Cml\Cache\Apc

Inheritance: extends Base
Show file Open project: linhecheng/cmlphp

Public Methods

Method Description
__construct ( $conf = false ) 使用的缓存配置 默认为使用default_cache配置的参数
__construct ( bool|array $conf = false ) 使用的缓存配置 默认为使用default_cache配置的参数
decrement ( mixed $key, integer $val = 1 ) : boolean 自减
delete ( mixed $key ) : boolean 删除对象
get ( mixed $key ) : mixed 根据key取值
getInstance ( string $key = '' ) : void 返回实例便于操作未封装的方法
increment ( mixed $key, integer $val = 1 ) : boolean 自增
set ( mixed $key, mixed $value, integer $expire ) : boolean 存储对象
truncate ( ) 清洗已经存储的所有元素
update ( mixed $key, mixed $value, integer $expire ) : boolean | integer 更新对象

Method Details

__construct() public method

使用的缓存配置 默认为使用default_cache配置的参数
public __construct ( $conf = false )

__construct() public method

使用的缓存配置 默认为使用default_cache配置的参数
public __construct ( bool|array $conf = false )
$conf bool|array

decrement() public method

自减
public decrement ( mixed $key, integer $val = 1 ) : boolean
$key mixed 要自减的缓存的数据的key
$val integer 自减的进步值,默认为1
return boolean

delete() public method

删除对象
public delete ( mixed $key ) : boolean
$key mixed 要删除的缓存的数据的key
return boolean

get() public method

根据key取值
public get ( mixed $key ) : mixed
$key mixed 要获取的缓存key
return mixed

getInstance() public method

返回实例便于操作未封装的方法
public getInstance ( string $key = '' ) : void
$key string
return void

increment() public method

自增
public increment ( mixed $key, integer $val = 1 ) : boolean
$key mixed 要自增的缓存的数据的key
$val integer 自增的进步值,默认为1
return boolean

set() public method

存储对象
public set ( mixed $key, mixed $value, integer $expire ) : boolean
$key mixed 要缓存的数据的key
$value mixed 要缓存的值,除resource类型外的数据类型
$expire integer 缓存的有效时间 0为不过期
return boolean

truncate() public method

清洗已经存储的所有元素
public truncate ( )

update() public method

更新对象
public update ( mixed $key, mixed $value, integer $expire ) : boolean | integer
$key mixed 要更新的缓存的数据的key
$value mixed 要更新的要缓存的值,除resource类型外的数据类型
$expire integer 缓存的有效时间 0为不过期
return boolean | integer