LOADING

Thinkphp5 Memcache缓存的使用

//memcache

'memcache_option' => array(

'host' => '127.0.0.1',
'port' => '11211',
'expire' => 0,
'prefix' => 'pyh_',
//'length' => '',
//'timeout' => '60*20',
//'persistent' => '',

),
控制器
Cache::set($old_token['token'],$old_token['token']);//设置
$cache = Cache::get($old_token['token']);//获取
Cache::rm($old_token['token'],0); //删除

标签: Thinkphp5

添加新评论