1) $this->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));
2) $this->load->driver('cache');
用第一种载入cache类的话,就使用$this->cache->get()或$this->cache->save()
用第二种载入cache类的话,就使用$this->cache->apc->get()这样的方式,指定你使用的缓存方案
除了基于纯文本的缓存(文件缓存)外,其他缓存组件均需对服务器环境进行正确配置才能使用.
|