I use this method to store my global settings:
http://dsi.vozibrale.com/articles/view/simple-db-based-configuration-for-cakephp-apps

And also cache them so they are fetched from the database only when
changed from the app, as you can see here:

http://github.com/lecterror/neutrinocms/blob/da9a1f7633564f86330c098f20457e7e7ac371a0/models/configuration.php#L43

Just remember to clear the cache afterSave() and afterDelete() and you
should be grand.

On May 14, 6:43 pm, Pixelastic <[email protected]> wrote:
> Hello,
>
> My app needs a couple of "settings" to work, settings I have to fetch
> on every page request (like the default metadescription, and some
> other strings and booleans I will need in every views). These settings
> are global (they are the same for every page and for every user), and
> I have to change them about once every three weeks. I used to keep
> them in my database and getting them on every request.
>
> But hitting my db on every request for so much little data seems a
> little overhead to me now, and I was wondering if  (in terms of
> performance) it had a real impact ? The amount of data queried is
> really small, but it takes 5-6 requests.
>
> And if so, what would be a possible alternative ? (Maybe using cake
> Cache ?)
>
> Thanks in advance to anyone who could give me some pointers about that
--~--~---------~--~----~------------~-------~--~----~
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