manual clear page caching code |
[eluser]ifew[/eluser]
i'm create some easy method for clear page caching by extend from CI_Output 1. create file in System/Application/Library /system/application/libraries/My_Output.php ("My_" is your library suffix name) 2. extend from CI_Output Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 3. how to use page caching Code: $this->output->cache(60); //1 Hour 4. how to clear page caching Code: $this->output->clear_cache('http://www.web.com/profile'); Reference Page Caching with CodeIgniter and Cache Clearing code
[eluser]DominixZ[/eluser]
I suggest another good function. It is clear_all_cache(); This may be nice when use in backend.
|
Welcome Guest, Not a member yet? Register Sign In |