Welcome Guest, Not a member yet? Register   Sign In
coddeigniter cache library
#4

[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


Messages In This Thread
coddeigniter cache library - by El Forum - 03-15-2011, 10:58 PM
coddeigniter cache library - by El Forum - 03-16-2011, 12:43 AM
coddeigniter cache library - by El Forum - 03-16-2011, 01:45 AM
coddeigniter cache library - by El Forum - 03-16-2011, 11:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB