简体   繁体   中英

cakephp views caching doesn't work

I'm trying to get working views caching just as is described cache chapter on book. I created dir /tmp/views, and chmod 777 on it. Relevant helper is being autoloaded.

I use default settings in core.php :

Configure::write('debug', 0);
Configure::write('Cache.check', true);
Cache::config('default', array('engine' => 'File'));

And in my controllers (i also tried with arrays):

var $cacheAction = true;

I'm using newest 1.3 version. Any ideas ?

The cache directory is APP/tmp/cache/views - unless you just made a typo.

Also I (personally) haven't seen var $cacheAction = true , so perhaps try:

var $cacheAction = "1 hour";

or

var $cacheAction = array(
                      'view/' => 5000
                   )

for a specific action, and see if you get better luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM