Driver
└─Memcache
public class Memcache
extends Driver
| Constructor Summary | |
|---|---|
| void | __construct(array options) 架构函数 |
| Method Summary | |
|---|---|
| bool | has(string name) 判断缓存 |
| mixed | get(string name, mixed default) 读取缓存 |
| bool | set(string name, mixed value, integer expire) 写入缓存 |
| false|int | inc(string name, int step) 自增缓存(针对数值缓存) |
| false|int | dec(string name, int step) 自减缓存(针对数值缓存) |
| bool | rm(string name, bool|false ttl) 删除缓存 |
| bool | clear(string tag) 清除缓存 |
| Methods inherited from think\cache\Driver | |
|---|---|
| clear, dec, get, getCacheKey, getTagItem, handler, has, inc, pull, rm, set, setTagItem, tag | |
public void __construct(array options)
架构函数
public bool has(string name)
判断缓存
public mixed get(string name, mixed default)
读取缓存
public bool set(string name, mixed value, integer expire)
写入缓存
public false|int inc(string name, int step)
自增缓存(针对数值缓存)
public false|int dec(string name, int step)
自减缓存(针对数值缓存)
public bool rm(string name, bool|false ttl)
删除缓存
public bool clear(string tag)
清除缓存
缓存基础类