码迷,mamicode.com
首页 > 系统相关 > 详细

Kohana Cache

时间:2019-06-06 19:19:33      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:rap   ade   with   setting   can   hana   eve   stand   load   

The default cache group is loaded based on the Cache::$default setting. It is set to the file driver as standard, however this can be changed within 
the /application/boostrap.php file // Change the default cache driver to memcache Cache::$default = ‘memcache‘; // Load the memcache cache driver using default setting $memcache = Cache::instance();

  

动态切换缓存方式为file

$key = ‘AjSR/piQT24JaYEgh6V9tA==‘;
$data = array(‘id‘=>1, ‘name‘=>‘liuchao‘);
Cache::instance("file")->set($key, $data, 60);
print_r(Cache::instance("file")->get($key));
//Cache::instance("file")->set($key, $data, (CFG_DEBUG?-1:60));

E:\html\tproject\framebota\runtime\com.bota.work\cache\ac\aca9887487bd968425c04be6907f90152a54527d.cache

60
a:2:{s:2:"id";i:1;s:4:"name";s:7:"liuchao";}

 

 

Kohana Cache

标签:rap   ade   with   setting   can   hana   eve   stand   load   

原文地址:https://www.cnblogs.com/hnhycnlc888/p/10986485.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!