开发者

CakePHP 1.2 - Cache::delete doesn't work in prod

I have a curious problem. I have a shell file runned by cron each 15 minutes to gathers different RSS data. I use cache helper in CakePHP to save the result as this :

echo 'Update cache...';
Cache::delete('AggregatedNews.getHome');
Cache::delete('AggregatedNews.getHome.fr');
Cache::delete('AggregatedNews.getHome.en');

Cache::write('AggregatedNews.getHome',$this->AggregatedNews->getHome());
Cache::write('AggregatedNews.getHome.fr',$this->AggregatedNews->getHome(array('AggregatedNews.language'=>'fr')开发者_开发技巧));                          Cache::write('AggregatedNews.getHome.en',$this->AggregatedNews->getHome(array('AggregatedNews.language'=>'en')));

echo 'Cache updated!';

This code works well on my computer and in dev environment on the server. But in prod, nothing happens. If I manually delete the cache file to see if Cache::Write works, it's still the same.... Somebody have an idea?

Thanks!


The most probable reason is you forgot to set write permission to tmp folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜