[Codeigniter] Specific DB key value caching
Permalink: http://www.ramonfincken.com/permalink/topic363.html
Rating : 3 / 5Rate this article (5 = best) 1 2 3 4 5
Tags:
cache ,
caching ,
ci ,
codeigniter ,
db ,
garbage collection ,
gc ,
key ,
val ,
value ,
var
View previous topic
::
View next topic
Author
Message
ramon fincken Site's programmerGet a free globally recognized avatar It's free! Joined: 03 Aug 2007 Posts: 412 Location: A'dam/Diemen, The Netherlands
Posted: Wed Dec 03, 2014 11:18 am Post subject: [Codeigniter] Specific DB key value caching
Fed up with the default caching mechanism?
Check out Var-cache: https://github.com/bcit-ci/CodeIgniter/wiki/Var-Cache
Ow .. and if you need garbage collection:
FIND
Code: // Load variables that have not expired into $this->vars
$query = $CI->db->get_where($this->table_name,array('expiration >='=>date('Y-m-d H:i:s')));
foreach($query->result() as $var) {
$this->vars[$var->name] = $var->value;
}
AFTER, ADD
@see http://pastebin.com/KuX8wBzP
Back to top
Google adsense Advertisement
Posted: Wed Dec 03, 2014 11:18 am Post subject: [Codeigniter] Specific DB key value caching
Advertisement
Back to top
GravityForms Advertisement
Posted: Wed Dec 03, 2014 11:18 am Post subject: [Codeigniter] Specific DB key value caching
Advertisement
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum