[Codeigniter] Specific DB key value caching

By.

min read

My profile

Share this:

Fed up with the default caching mechanism?

Check out Var-cache: [url]https://github.com/bcit-ci/CodeIgniter/wiki/Var-Cache[/url]

Ow .. and if you need garbage collection:

FIND
[code:1:5b3b741b62] // 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;
}[/code:1:5b3b741b62]

AFTER, ADD
@see http://pastebin.com/KuX8wBzP

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *