Khaos :: KhCache |
[eluser]Neophyte[/eluser]
Updated - 26/03/2008 - Download - Khaos::KhCache-0.3 Introduction KhCache is a pretty basic caching library currently with two containers (File and APC), the library is designed to complement codeigniters own caching system by allowing you to cache the output of smaller segments of code when no full page cache is available for CI to directly display. Quick Reference Code: /* KhCache will work right out the box aslong as the system/cache folder is writable. However if you wish to change the behaviour of KhCache then create the config file khaos.php. Below is a sample config which represents the default behaviour of KhCache. Code: $config['cache'] = array('container' => 'File', Code: $config['cache'] = array('container' => 'APC'); auto_clean_life - Files older than this will be removed. auto_clean_all - By default only cache files prefixed with khcache_ are removed set to true to have khcache clean the entire directory
[eluser]Neophyte[/eluser]
ChangeLog - KhCache - 0.2 Feature - new method 'call' to make function caching easier Feature - auto cleaning when using File container (based on the PEAR::Cache_Lite approach)
[eluser]Neophyte[/eluser]
ChangeLog - KhCache - 0.3 Feature - new method 'delete_all' to clear all cache items
[eluser]BorisK[/eluser]
This is pure gold. CI and EE should come with granular caching by default. I don't understand how people run large sites without granular caching and expiration. Your use of containers is great. Leaves room for other things like memcaching or even DB caching drivers. Thank you for sharing.
[eluser]Majd Taby[/eluser]
You have a typo in the comments, it's "instantiate", not "instanciate"
[eluser]Neophyte[/eluser]
I'll consider changing it in the next release, no promises though
[eluser]Adaptive[/eluser]
On one of my codeigniter sites I use different views based on the user IP address. I can only use db cache, on specific queries. Is there a good way to use KhCache?
[eluser]louis w[/eluser]
This looks very interesting, thanks for posting this Neophyte. I understand this is a new project, but I would like to see a little more documentation. Can this be called from a View? I think it would be nice to be able to cache your view as the final output but also be able to cache pieces of the view at different cache times to save on other processing. |
Welcome Guest, Not a member yet? Register Sign In |