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
大家讲道理2017-05-16 16:45:32
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 服务器 可以通过配置文件: memcached.php 来配置,该文件在 application/config/ 目录下.
$this->load->driver('cache');
$this->cache->memcached->save('foo', 'bar', 10);