http://api.cakephp.org/class_cache.html

On Tue, Jun 3, 2008 at 7:57 PM, oleonav <[EMAIL PROTECTED]> wrote:
>
> I have a model which loads a external xml file. It would be nice if
> the raw results or better the parsed array holding the data would be
> cached for a couple of hours.
>
> So far i tried the following:
>
> <?php
> class Feed extends AppModel
> {
>        var $name = 'Feed';
>        var $useTable = false;
>        var $cacheQueries = true;
>
>        function getCurrencies(){
>
>                uses('Xml');
>
>                //url of external resource
>                $url = 'URL of xml external resource ....';
>
>               //get the xml feed & process to an array
>                $feed = new XML($url);
>                $items = 
> $feed->children[0]->children[2]->children[0]->children;
>
>                .....
>                 Stuff to parse the results in an array
>
>                //return result to controller
>                return $resultArr;
>        }
>
> }
> ?>
>
> Any suggestions...
>
> Thanks!
> >
>

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