Flag to turn view caching on/off
Activity
Brad WoodMarch 9, 2016 at 5:12 AM
Sorry, but that's not really making sense to me. Either way, the programmer must write code to use event or view caching and I think whether that code is a method annotation or a method parameter is really neither here nor there. Yes, I get that the parameter can be changed at run time (which is what I assume you're getting at) but I don't think it has any real impact on this ticket.
1) Event caching provides a nice application-wide setting to enable/disable it
2) View caching should also provide a nice application-wide setting to enable/disable it.
3) Those two settings should share the same default (either on or off)
Right now ColdBox seems half-implemented and inconsistent with itself. I would expect to be able to turn either form of caching on or off at a global level and I would also expect both event and view caching to share the same default.
Luis MajanoMarch 9, 2016 at 1:01 AMEdited
One is based off metadata the other one of method calls. You nuts explicitly pass a cache = true for view caching.
Brad WoodMarch 8, 2016 at 10:07 PM
I don't know that it matters how event or view caching is enabled or disabled. It would be nice to quickly and easily turn off view caching for the entire app for testing or on development. It would be a little messy to have to create a setting and use that setting everywhere. Besides, it's consistent with how event caching works. Also, event caching is not automatic either, so I'm not sure what you mean there.
Luis MajanoMarch 8, 2016 at 9:36 PM
I actually don't know if I agree with this setting since view caching is not automatic, but an argument you passed, which is different than event caching. So basically, you can have your own setting for this already
Event caching has a config setting to globally turn it on and off for the entire application. Implement viewCaching setting to globally turn view caching on and off like event caching. Default to true for backwards compatibility, but it would be nice to make them default the same way eventually.