coddeigniter cache library |
[eluser]nani[/eluser]
Hi all ! i want to implement cache system to my website.. i found Phil SturgeonWeb cache library is a good one.... http://philsturgeon.co.uk/code/codeigniter-cache if any one used this library please tell me how to implement this and any documentation for this....... there is given a few lines of code on how to use this but, i need some clear description please help me. i spend a lot time on searching for codeigniter caching.... Thank you...
[eluser]Julio Fagundes[/eluser]
Its pretty simple. Code: Class Example extends CI_Controller Read the readme.txt file inside the zip, there are other examples.
[eluser]nani[/eluser]
Thanks where to use the cache call before calling the model function or after the model call or i have to check for cache and if its not exist then i have call model function and then cache.. i have this doubts...please help me i'm first time implementing cache... Code: // cache modal call am i going wrong.....
[eluser]Julio Fagundes[/eluser]
only this Code: $courses_list = $this->cache->model('get_course_data', 'simpleSearch', array($search_params), 120); The cache library will call the model and make a cache for the next 2min (120seg) The next call (another run of the script): - if not exist a cache (or expired), $this->cache->model(...) will call the model, create a cache and return. - if exist, $this->cache->model(...) will just return the cached value. You can name your caches, in the case of query searchs I think is the best way. read about it in the readme.txt |
Welcome Guest, Not a member yet? Register Sign In |