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'))); ?>

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 [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

Reply via email to