Welcome Guest, Not a member yet? Register   Sign In
Identifying an individual file in the cache
#1

[eluser]Unknown[/eluser]
Hello.

We have a website with around 43,000 database records with each individual record containing various fields we use to display information on a page. The site uses a CMS and we have enabled caching.

What we want to do is identify an individual cached page somehow so that we can delete that cached version when we make an update rather than dump the entire cache.

Can this be done within the framework? Has anyone come up with a solution to this?

Apologies in advance if I am being a pratt and have missed something blatantly obvious.
#2

[eluser]GSV Sleeper Service[/eluser]
the cache filename is an md5 sum, see Output.php in the system/libraries folder to see how it works, but basically it's
Code:
$uri =    $CI->config->item('base_url').
    $CI->config->item('index_page').
    $CI->uri->uri_string();
$cache_path .= md5($uri);
so you should be able to determine what cache file to delete by rebuilding $uri and finding the md5sum
#3

[eluser]Unknown[/eluser]
Genius. Thank you.




Theme © iAndrew 2016 - Forum software by © MyBB