68KB Caching
68KB lets you cache your pages in order to achieve maximum performance.
Although 68KB 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.
How Does Caching Work?
Caching can be enabled on a per-page basis, 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 cache file will be written to your includes/application/cache folder. 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 and refreshed before being sent to the browser.
Note: The Benchmark tag is not cached so you can still view your page load speed when caching is enabled.
Enabling Caching
To enable caching, go to administration -> settings -> main settings and enter a value for the time.
Where value is the number of minutes you wish the page to remain cached between refreshes.
Note: Before the cache files can be written you must set the file permissions on your includes/application/cache folder such that it is writable.
Note: You can change the location the cached files are saved by editing the includes/config.php.
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. Note: Removing the tag will not delete the cache immediately. It will have to expire normally. If you need to remove it earlier you will need to manually delete it from your cache folder.
Database Caching
You can also cache the sql queries by editing the includes/config.php file and changing the following values:
$db['default']['cache_on'] = TRUE; $db['default']['cachedir'] = APPPATH .'cache/';
The constact APPPATH points to includes/application folder.
With this on any time you add, edit, or delete data the full db cache will be rebuilt.