phpcachingkohana-3.3

What's the simplest way to clear the cache in Kohana 3.3.1?


I inherited a web application in Kohana 3.3.1 (I'm used to working in Symfony).

What is the simplest command or process to clear the entire cache?

I've looked at

http://forum.kohanaframework.org/discussion/5779/how-i-can-clear-the-cache-folder-in-ko3/p1

and

http://www.hcs.harvard.edu/~powerpak/kohanadocs/libraries/cache.html

But I'm really looking for something that can be automated as part of our deploy/CI process.

Thanks!


Solution

  • I think what easiest way will be write a minion task ( https://github.com/kohana/minion )

    Put your task in classes/Task/ClearCache.php

    <?php
    class Task_ClearCache extends Minion_Task {
    
        protected function _execute(array $params)
        {
            Cache::instance()->delete_all();
        }
    } 
    ?>
    

    And run it into your BASEPATH directory > php minion.php ClearCache