Welcome Guest, Not a member yet? Register   Sign In
Cache control
#1

[eluser]Unknown[/eluser]
Hi all,

Codeigniter gives us a very simple but efficient page caching system.
However, I wanted to clear a specific cached page (for example, when that page has been updated by contributor or admin via the backoffice).
No problem, here is a quick and dirty workaround:

Code:
...
$uri =    '/'.$this->config->item('base_url').$this->config->item('index_page').$pageurl;
$cache_path .= md5($uri);
if (is_file($cache_path))
{
    unlink($cache_path);
}
...

...which work nice and smooth.

But is there a way to use native CI method/class, to do it in a clean way ?

Thank you !




Theme © iAndrew 2016 - Forum software by © MyBB