change setting on runtime

Hi,

is there a function to change a setting from ModuleConfig on runtime without fwreinit?

Thanks,

Gunnar

Grab the settings and change it. Don’t have the code handy, but its just as simple as getModuleSettings() and change what you wish to change. If it is the actual info stored in the settings struct in the module config then you do the same by getting it and changing it.

I want the change value be available in the application. If I understand the setting service correctly it caches the setting struct, so I would have evict the cache as well.

Depends how your approaching it, if your injecting the settings yes, but not if you inject the service.

Is this a module setting or a ContentBox global setting?

It’s global

Ahh ok yes then you can set it via the setting service and call the flush methods on it.

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org

ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483

Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox