On Fri, Sep 25, 2009 at 12:34 AM, Barney <[email protected]> wrote: > > thanks, what's caching result? can you give me more tips please >
The server stores a version of the result so that, on subsequent requests, it need not request the data from the DB, filter it, turn it into a view (the HTML). Although there are several different types of caching with Cake, including caching queries or caching the entire view. Also, there are different types caching engines one can use. The config is in app/config/core.php. The most basic is "file", which stores the cache as files (big surprise). MemCache uses, as the name suggests, the server's memory. That's the one i prefer but it involves installation on the server. If you do not control your own server, this option is likely not available. But it couldn't hurt to ask you hosting company if it is. APC may also be available. Anyway, the basic idea would be to check the cache in your action and, if available, return that. Otherwise, do a find() as normal and write the result to the cache. http://book.cakephp.org/view/764/Cache http://teknoid.wordpress.com/2009/06/17/send-your-database-on-vacation-by-using-cakephp-memcached/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
