Hey All,

a question about persistent data. I was using a Config method that I
got from the old Wiki, but when I upgraded to 1.1.14.4797 this broke.
So I checked the Bakery again and found this 
http://bakery.cakephp.org/articles/view/61,
having trouble getting this one working too. But both (the old and new
method) have the same problem I think, namely for each configuration/
setting lookup it has to query the database.

So I am trying to roll my own (or can some one suggest an
alternative?) that has the following features I want,

1. One static instance, available to all controllers

2. Lazy instantiation of database connection, i.e. when the first
get($key) called

3. When it is instantiated it should select all key/value pairs from
the database and store them in an associative array

4. when the second and subsequent get($key) function call occurs,
should return the value from the associative array rather than DB
lookup

5. Have a method called set($key, $value), that updates the
associative array and possible the database (depending on where/how db
is updated).


Does any one know if such a component exists? I have tried creating a
class called "Settings" in the models folder and then a component, but
the component just dies saying "can't instantiate non existent class".
Any advice?

Cheers,
Rob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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