Looks like a good start. I've been meaning to tweak some queries to make use of SQL_CACHE as well ... maybe that could be a feature request for the core. Shouldn't be too hard to add a class var $sql_cache and have it be of type bool to be able to model-specific caching on SELECT statements. Would be immensely handy for somewhat static look-up tables.
On Jan 21, 12:30 pm, "Websta*" <[email protected]> wrote: > We needed to implemnt mysql query cache in our querries in a few > places, and the first implmentation of this ended up being the > following: > > http://pastebin.com/mb4f95ad > > it was just whipped together quickly, and im not endorsing the use of > this code to everyone, just thought someone might be interested, or > someone might have a better/simpler or less hackish feeling solution. > but alas it provides what we wanted for now. comments welcome. > > implement by addingSQL_CACHEto your fields param of your model > methods --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
