With some help... I figured out the problem. I was using the file cache option and although the /tmp/cache directory was writable I was missing a necessary directory. Since I was trying to cache an element the /tmp/cache/element directory needs to exist and it must be writeable. My problem was that the element directory was missing. Once I added it... everything started working as expected.
On Feb 9, 10:13 am, Jeremy <mayt...@gmail.com> wrote: > Hi all. I have created an element that will interact with an external > webservice. The webservice presents weather forecast data in XML and > I am using my element code to parse the XML and render it on my site. > The weather forecast service never updates their data more frequently > than 1 hour, so I would like to cache the rendered element HTML for 1 > hour globally for all users. Right now, each refresh of the page than > contains this weather element code will cause a hit to the weather > forecast webservice and the XML will get reparsed even if it hasn't > changed. > > I have tried to follow the instructions on how to turn on caching, but > it does not seem to be working. > > Here's what I have done so far: > 1) Turned this on in the config Configure::write('Cache.check', > true); > 2) I am calling the element with this code: <?php echo $this- > > > > >element('weather', array('cache'=>array('time'=>'+1 hour'))); ?>- Hide > >quoted text - > > - Show quoted text - Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en