CI goes to the database to query the results
If the cache is turned on in the configuration, it can be cached
But it is cached in the form of a file
If I use memcache to cache the results, is it unnecessary?
There is another question, which one is more efficient, CI’s own caching mechanism or memcache?
Waiting online
When asking a question, it is best to state the CI version and provide as much descriptive information as possible.
CI itself can choose from a variety of different Cache Drivers.
Look in the configuration file and modify the cache file to
適用于 CI 2.* 版本
使用分布式 Memcached 服務(wù)器 可以通過(guò)配置文件: memcached.php 來(lái)配置,該文件在 application/config/ 目錄下.
$this->load->driver('cache');
$this->cache->memcached->save('foo', 'bar', 10);