If you no longer wish to cache a file you can remove the caching tag and it will no longer be refreshed when it expires. Note: Removing the tag will not delete the cache immediately. It will have to expire normally. If you need to remove it earlier you will need to manually delete it from your cache folder.
The CI_Output class ($this->output->cache(30)) doesn’t provide any public delete_cache() method. To delete database cache, you can use Code Igniter’s built in methods like $this->db->cache_delete_all(). For application cache, you need to write the code yourself.
Why would you want to?
There’re several use cases. For example, if a non-coder has just made a content update to your site via a CMS and you want to make sure it shows up immediately and not after the remaining amount of time specified via $this->output->cache(YOUR_TIME_INTERVAL).
View original post 107 more words