Login or Register

RSS IconRecent posts in this topic

avatar
hualahyja on Aug 4. 2008. 8:31 am
In my module I use ProjectConfigOptions.class.php for storing some settins for project. While debugging my module I think i found a bug.

The ProjectConfigOptions are cached, but when I alter and save my option, the cache won't refresh. Database record is OK. I have investigated the source and there was no chace refresh by updating the project config in db.

The solution for me was creating a method in my module's Controller, which deletes the cache record for that option each time my config option is saved.
avatar Staff
Ilija Studen on Aug 4. 2008. 9:37 am
hualahyja:
The ProjectConfigOptions are cached, but when I alter and save my option, the cache won't refresh. Database record is OK. I have investigated the source and there was no chace refresh by updating the project config in db.


Do you change records by directly altering values in database or you use ConfigOptions::setValue()?
activeCollab team member | LinkedIn
avatar Staff
Ilija Studen on Aug 4. 2008. 10:33 am
ConfigOptions::setValue() takes care of cache if you use it instead of directly inserting data into database. You might want to check how we work with configuration options in SettingsController (in system module).
activeCollab team member | LinkedIn
avatar
hualahyja on Aug 4. 2008. 10:50 am
Thanks for reply, I check that in SettingsController.

I use ProjectConfigOptions::setValue(), because there is an argument $project. I didn't find a way to tell ConfigOptions that I need to create/change the ProjectConfigOption. Maybe I only looked in a wrong place...
avatar Staff
Ilija Studen on Aug 4. 2008. 11:49 am
Thanks, we'll check it out.
activeCollab team member | LinkedIn
avatar
hualahyja on Aug 4. 2008. 12:02 pm
OOps, I did a mistake. I wanted to write "there is an argument $project", but I wrote $object in my previous post. I corrected it.

RSS IconRecent posts in this topic