PHP Class phprs\util\FileCache

Author: caoym
Inheritance: implements phprs\util\KVCatchInterface
Datei anzeigen Open project: caoym/phprs-restful

Public Methods

Method Description
__construct ( $cache_dir = null )
del ( string $key ) : boolean 删除key
get ( string $key, boolean &$succeeded = null ) : mixed 模拟apc, 只在没有apc的开发环境使用
set ( string $key, mixed $var, integer $ttl ) : void 设置key

Method Details

__construct() public method

public __construct ( $cache_dir = null )

del() public method

删除key
public del ( string $key ) : boolean
$key string
return boolean Returns true on success or false on failure.

get() public method

模拟apc, 只在没有apc的开发环境使用
public get ( string $key, boolean &$succeeded = null ) : mixed
$key string
$succeeded boolean
return mixed object on success or false on failure

set() public method

设置key
public set ( string $key, mixed $var, integer $ttl ) : void
$key string
$var mixed
$ttl integer TODO: 暂不支持
return void