You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 26, 2020. It is now read-only.
<p>CodeIgniter features wrappers around some of the most popular forms of fast and dynamic caching. All but file-based caching require specific server requirements, and a Fatal Exception will be thrown if server requirements are not met.</p>
<p>The following example will load the cache driver, specify <ahref="#apc" title="APC">APC</a> as the driver to use, and fall back to file-based caching if APC is not available in the hosting environment.</p>
<p>This function is automatically called when accessing drivers via <samp>$this->cache->get()</samp>. However, if the individual drivers are used, make sure to call this function to ensure the driver is supported in the hosting environment.</p>
<p>All of the functions listed above can be accessed without passing a specific adapter to the driver loader as follows:</p>
<code>$this->load->driver('cache');<br/>
$this->cache->apc->save('foo', 'bar', 10);</code>
<p>For more information on APC, please see <ahref="http://php.net/apc">http://php.net/apc</a></p>
<h2id="file">File-based Caching</h2>
<p>Unlike caching from the Output Class, the driver file-based caching allows for pieces of view files to be cached. Use this with care, and make sure to benchmark your application, as a point can come where disk I/O will negate positive gains by caching.</p>
<p>All of the functions listed above can be accessed without passing a specific adapter to the driver loader as follows:</p>
<p>For more information on Memcached, please see <ahref="http://php.net/memcached">http://php.net/memcached</a></p>
<h2id="dummy">Dummy Cache</h2>
<p>This is a caching backend that will always 'miss.' It stores no data, but lets you keep your caching code in place in environments that don't support your chosen cache.</p>