Model Integration and Development Mode

Hello :slight_smile:

Previously, when using Lightwire we had IOCFramework set to Lightwire and IOCObjectCaching set to false in our development environment config file. Now we have switched to the new Model Integration. IOCFramework is an empty string and IOCObjectCaching is still false. Previously, changes to singletons would apply immediately, without reinitializing the framework. Now, we are finding that we are having to reinitialize the framework to see changes to the singletons in our model (components with the setting cache=“true” cacheTimeout=“0”).

Are we missing a setting that is causing this issue?

Thanks,
Christine

IOCObject caching is used after a bean is produced from LW or CS, but even if you declared singletons in your LW or CS declarations, changes to those would only be reflected on a fw reinit. The behavior (as of now) of the model integration is that if a singleton is cached, then the only way to refresh it is with a fwreinit. However, this proposes maybe a new setting that could stop model caching. Maybe a setting called: ModelObjectCaching = false/true. This could enable/disabled model integration caching. What do you Think?

The only way LW or CS reflected changes on singletons is if they where not singletons in the declaration or autoreload was set to true.

Luis

I would like to see a setting like you describe to turn off model
caching. Much of our code that we change on a regular basis on our
dev environment is in our services and DAOs. Since these are cached
it would require us to almost continually keep ?fwreinit=1 in our URL
to pick up changes.

If you would use the ColdBox sidebar, it's just one click to reinit
the framework.

Ernst

HI Brad,

This has been committed to SVN. Just set a new coldbox directive settings: “ModelsObjectCaching” to true or false depending on your environment.

Luis

Luis

Awesome. Thanks Luis.

@Ernst: I have used the sidebar and I know it's easy to reinit, but
when you are making change after change to your model, reinitting
every time feels like trying to develop with trusted cache turned
on. :slight_smile:

~Brad

Let me know what other aspects of the model integration need polishing.