The CodeIgniter lets you cache your pages in order to achieve maximum performance.
Caching a page will improve the page load speed. By caching your pages, since they are saved in their fully rendered state, you can achieve performance much closer to that of static web pages.
Caching can be enabled on a per-page basis, cached files are stored in application/cache folder. and you can set the length of time that a page should remain cached before being refreshed. When a page is loaded for the first time, the file will be cached using the currently configured cache engine. On subsequent page loads, the cache file will be retrieved and sent to the requesting user’s browser. If it has expired, it will be deleted automatically.
Caching can be enabled by executing the following line in any of the controller’s method.
$this->output->cache($m);
Where $m is the number of minutes, you wish the page to remain cached between refresh. and Or delete after time
Deleting Caches
If you no longer wish to cache a file you can remove the caching tag and it will no longer be refreshed when it expires.
If you need to manually delete the caches, you can use the delete_cache() method:
// Deletes cache for the currently requested URI
$this->output->delete_cache();
// Deletes cache for /foo/bar
$this->output->delete_cache('/foo/bar');
©2024 All Rights Reserved yourquorum.com
CodeIgniter lets you cache your pages in order to achieve maximum performance.
Although CodeIgniter is quite fast, the amount of dynamic information you display in your pages will correlate directly to the server resources, memory, and processing cycles utilized, which affect your page load speeds. By caching your pages, since they are saved in their fully rendered state, you can achieve performance that nears that of static web pages.