Currently I have my dev context set to coldbox.configAutoReload= true;
since i don't want any model cached while I'm working on it.
Is there a way to accomplish that (disable caching) without reloading
the config/framework on each request? For the most part it's ok, but
slightly annoying when testing i18n since every request reverts back
to the default locale once the config is reloaded. I've created a
seperate environment to faciliate this, but it's a bit awkward having
to flick between the two.
My understanding of cachebox config is fairly limited - can model
caching be disabled for a single environment?
Is there a way to accomplish that (disable caching) without
reloading
the config/framework on each request? For the most part it's ok, but
One option is to use the cache="false" option in the cfcomponent
definition. I often do this while working on a single file (or a
couple). Just remember to change them back before you go to
production!
Example:
<cfcomponent displayname="SecurityService" cache="false" hint="I
provide a service layer for permissions management." output="false">
thanks for pointing me at that setting - I missed the model struct!
Unfortunately it's brought up another issue, though -- this is either
a bug with autowire or some issue with how I've set it up, but I get
stack overflows when I disable model caching as described above
(models.objectCaching=false). I'm using Coldbox's inbuilt DI.
Here's a cleaned up stack trace -- these four entries repeat in
sequence until the stack overflows:
LINE : 293
Template: BeanFactory.cfc
method : getModel
stopRecursion=arguments.stopRecursion
From the looks of things it's continuously recreating the same objects
over and over. I had a check for anything that looked like a circular
dependency but couldn't find anything (I assume that would be a
problem?)