Re: caching with pages and '/' route
I have a related problem, I think. I cannot figure out how to cache any of the pages in the Pages Controller. Particularly the homepage, which for me is also routed to '/'. On Tuesday, February 22, 2011 11:31:46 AM UTC-5, desig...@gmail.com wrote: Ok, So it's basically treating /home the same as /? So I need to NOT use the global Cache.check and setup the caching in each controller as I have done before? Does this mean that I will have to copy the pages class from the core to control the pages caching? d//t. On Feb 22, 3:39 pm, John Andersen j.andersen...@gmail.com wrote: The Dispatcher class has a method in which it checks for whether or not it should use a cached version of the URL, when the Cache.check configuration is set to true. So in your case it works as it should, you have told the Dispatcher to use cached versions. The Dispatcher uses /home whenever the / is specified. Enjoy, John On 22 Feb., 15:22, designv...@gmail.com designv...@gmail.com wrote: I have used caching before on controllers I have created and it's not been a problem, and it works fine for the controllers in this site. I am familiar with setting the cache configuration options and creating new ones in the core. I am just stumped over this issue regarding caching pages and the '/' route... I do not know where to set options for it. Cheers, d//t [snip] -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
caching with pages and '/' route
Hi there, I have the following routes defined: Router::connect('/', array('controller' = 'splashes', 'action' = 'index')); Router::connect('/home', array('controller' = 'pages', 'action' = 'display', 'home')); And when I enable caching I get 1 cache file created when I hit the site index called 'home' and then the '/home' page just displays the cached initial page... Any ideas why? d//t. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: caching with pages and '/' route
Please show your cache configuration! Enjoy, John On 22 Feb., 13:49, designv...@gmail.com designv...@gmail.com wrote: Hi there, I have the following routes defined: Router::connect('/', array('controller' = 'splashes', 'action' = 'index')); Router::connect('/home', array('controller' = 'pages', 'action' = 'display', 'home')); And when I enable caching I get 1 cache file created when I hit the site index called 'home' and then the '/home' page just displays the cached initial page... Any ideas why? d//t. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: caching with pages and '/' route
Haven't got anything apart from Configure::write('Cache.check', true); Currently... I have read I need to specify cacheAction for routes, but am unsure where I need to set that for routes/pages? TIA d//t. On Feb 22, 1:35 pm, John Andersen j.andersen...@gmail.com wrote: Please show your cache configuration! Enjoy, John On 22 Feb., 13:49, designv...@gmail.com designv...@gmail.com wrote: Hi there, I have the following routes defined: Router::connect('/', array('controller' = 'splashes', 'action' = 'index')); Router::connect('/home', array('controller' = 'pages', 'action' = 'display', 'home')); And when I enable caching I get 1 cache file created when I hit the site index called 'home' and then the '/home' page just displays the cached initial page... Any ideas why? d//t. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: caching with pages and '/' route
Sounds like you need to start reading first about caching in the CakePHP book at: http://book.cakephp.org/view/1193/Caching as there are several possibilities for caching your information. I would not turn on caching, unless I understand what is being cached and for how long :) Enjoy, John On 22 Feb., 14:39, designv...@gmail.com designv...@gmail.com wrote: Haven't got anything apart from Configure::write('Cache.check', true); Currently... I have read I need to specify cacheAction for routes, but am unsure where I need to set that for routes/pages? TIA d//t. [snip] -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: caching with pages and '/' route
I have used caching before on controllers I have created and it's not been a problem, and it works fine for the controllers in this site. I am familiar with setting the cache configuration options and creating new ones in the core. I am just stumped over this issue regarding caching pages and the '/' route... I do not know where to set options for it. Cheers, d//t On Feb 22, 2:04 pm, John Andersen j.andersen...@gmail.com wrote: Sounds like you need to start reading first about caching in the CakePHP book at:http://book.cakephp.org/view/1193/Caching as there are several possibilities for caching your information. I would not turn on caching, unless I understand what is being cached and for how long :) Enjoy, John On 22 Feb., 14:39, designv...@gmail.com designv...@gmail.com wrote: Haven't got anything apart from Configure::write('Cache.check', true); Currently... I have read I need to specify cacheAction for routes, but am unsure where I need to set that for routes/pages? TIA d//t. [snip] -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: caching with pages and '/' route
The Dispatcher class has a method in which it checks for whether or not it should use a cached version of the URL, when the Cache.check configuration is set to true. So in your case it works as it should, you have told the Dispatcher to use cached versions. The Dispatcher uses /home whenever the / is specified. Enjoy, John On 22 Feb., 15:22, designv...@gmail.com designv...@gmail.com wrote: I have used caching before on controllers I have created and it's not been a problem, and it works fine for the controllers in this site. I am familiar with setting the cache configuration options and creating new ones in the core. I am just stumped over this issue regarding caching pages and the '/' route... I do not know where to set options for it. Cheers, d//t [snip] -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: caching with pages and '/' route
Ok, So it's basically treating /home the same as /? So I need to NOT use the global Cache.check and setup the caching in each controller as I have done before? Does this mean that I will have to copy the pages class from the core to control the pages caching? d//t. On Feb 22, 3:39 pm, John Andersen j.andersen...@gmail.com wrote: The Dispatcher class has a method in which it checks for whether or not it should use a cached version of the URL, when the Cache.check configuration is set to true. So in your case it works as it should, you have told the Dispatcher to use cached versions. The Dispatcher uses /home whenever the / is specified. Enjoy, John On 22 Feb., 15:22, designv...@gmail.com designv...@gmail.com wrote: I have used caching before on controllers I have created and it's not been a problem, and it works fine for the controllers in this site. I am familiar with setting the cache configuration options and creating new ones in the core. I am just stumped over this issue regarding caching pages and the '/' route... I do not know where to set options for it. Cheers, d//t [snip] -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php