\PhalApiCache

PhalApi\Cache 缓存接口

Summary

Methods
Constants
set()
get()
delete()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

set()

set(string  $key, mixed  $value, integer  $expire = 600) 

设置缓存

Parameters

string $key

缓存key

mixed $value

缓存的内容

integer $expire

缓存有效时间,单位秒,非时间戳

get()

get(string  $key) : mixed

读取缓存

Parameters

string $key

缓存key

Returns

mixed —

失败情况下返回NULL

delete()

delete(string  $key) 

删除缓存

Parameters

string $key