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);  //删除

博客
请先登录后发表评论
  • 最新评论
  • 总共0条评论