Indeed, there are two caching types. There is no misnomer. If you want to cahe DB queries use http://jirikupiainen.com/2007/05/21/cakephp-cache/ method. If you want to cache VIEWS do the following: 1. Make sure you are using cakephp 1.2.0.5146alpha or newer 2. Disable Debug in core.php: define('DEBUG', 0); 3. Enable caching views in core.php: define('CACHE_CHECK', true); 4. Open the controller which views you want to cache, add helper Cache: var $helpers = array('Cache'); 5. In the same controller add: var $cacheAction = "+1 hour"; Now all of your views will be cached for 1 hour. I hope you will figure out how to cache only the specific views. ;)
On Jul 4, 8:19 pm, GreyCells <[EMAIL PROTECTED]> wrote: > The article linked above is spot on. Caching views is really a > misnomer - it's the *data* used by the views that usually needs > caching, and that should be handled by the controller (the place where > all the business logic is implemented). As usual, cake is heading in > the right direction with it's multiplecacheengines - I've only used > the filecacheengine so far and it does exactly what it says on the > tin. If you /really/ want tocacheviews, then transform the data > before caching it. > > ~GreyCells > > On Jul 4, 12:31 pm, Fordnox <[EMAIL PROTECTED]> wrote: > > >cacheworks using this > >articlehttp://jirikupiainen.com/2007/05/21/cakephp-cache/ > > , but still, is it the same cahe ? DB queries cahe and viewscache? > > > On Jul 4, 1:54 pm, Fordnox <[EMAIL PROTECTED]> wrote: > > > > I have the same problem as hi and hello, but setting debug to 0, > > > doesnt help. > > > what i'm missing here ? > > > cakephp 1.2.0.5146alpha > > > > On Jul 4, 1:09 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > > > Caching only works when DEBUG is set to 0 > > > > > Geoff > > > > --http://lemoncake.wordpress.com > > > > > On Jul 4, 7:07 pm, hi and hello <[EMAIL PROTECTED]> wrote: > > > > > > At core.php I have: > > > > > define('CACHE_CHECK', true); > > > > > > At the controller file I have: > > > > > var $helpers = array('Html', 'Form', 'Javascript', 'Ajax', > > > > > 'Cache' ); > > > > > var $cacheAction = true; > > > > > > But when I visit the url to call the controller I found theview > > > > >cachedoesnot work and in the app/tmp/cache/views directory there is > > > > > nothing. > > > > > > Is something wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
