在Kohana 3.3.1中清除缓存的最简单方法是什么? [英] What's the simplest way to clear the cache in Kohana 3.3.1?

查看:59
本文介绍了在Kohana 3.3.1中清除缓存的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Kohana 3.3.1中继承了一个Web应用程序(我曾经在Symfony中工作).

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?

我看过

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

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

但是我确实在寻找可以在我们的Deployment/CI流程中自动化的东西.

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

谢谢!

推荐答案

我认为最简单的方法是编写小兵任务(

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

将您的任务放在classes/Task/ClearCache.php

Put your task in classes/Task/ClearCache.php

<?php
class Task_ClearCache extends Minion_Task {

    protected function _execute(array $params)
    {
        Cache::instance()->delete_all();
    }
} 
?>

并将其运行到您的BASEPATH目录中>php minion.php ClearCache

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

这篇关于在Kohana 3.3.1中清除缓存的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆