Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 591 Bytes

Cache.md

File metadata and controls

19 lines (13 loc) · 591 Bytes

Cache

redis

方法 set

参数 类型 默认值 描述
name string
value string
expire int null 过期时间,null或者0表示永远不过期
flag string nx 值不存在则进行设置操作
xx 值存在才进行设置操作
$redis = Cache::getInstance('redis');
$redis->set('test', 'hello', 3600, 'nx');