[eluser]aguirre[/eluser]
Hi Guys,
i was wondering if there is a way to forcefully "uncache" a generated page?
Problem is: i have pages that are rather static and which i virtually want to have cached forever, except when there is new comment on one of them. The comment itself is not submitted via POST to the same page it is on, but sent via AJAX/POST to another controller that handles the storage etc.
Code:
/**
* ok, while writing this i found that i was about to suggest the solution myself. To save
* other people the five minutes figuring out i post the answer + solution
*/
i looked in the output-library where the md5 sums for the cache-items are generated and took it from there:
Code:
$cache_file_name = md5($this->config->item('base_url').
$this->config->item('index_page').
$this->uri->uri_string());
Use this code in your controller to have the name of the file at hand. Of course it only uses the full URL to make the md5, but md5 is so hard to guess so i thought i'd share it here
best
aguirre