Clearing cached singleton objects for development environments when using Wirebox

I just recently switched to CB 3.5 and started using Wirebox since the
getBean functionality was depreciated. We have wanted to move away
from Coldspring for a long time, and this was a perfect excuse. I have
to mention that the move has come with a very significant speed
increase. I am not sure if it is the new core CB or the switch from
Coldspring that caused this, but either way, I am very happy.

I have searched the docs on Wirebox and have search around this forum
and I am having a difficult time finding a way to clear the singleton
cache in my development environment. I have this setting in my
Coldbox.cfc, but I am seeing no mention of the singletonReload option
anywhere (maybe it was removed?):

    wireBox = {
      enabled = true,

The way around this has been to reinit each time, but I would prefer I
not have to do this.

Any help on this is greatly appreciated.




In development, you want the singletonReload set to true.

wirebox.singletonreload = true;

False for production.

That should take care of it for you.


Oops... I pasted the production config. In my local config, I am
setting singletonReload=true, but its not working. I have tested it by
setting it both ways and reiniting each time. I have also changed
other settings to make sure my environment is being detected correctly
(I also dumped getSetting('environment') to confirm). If this is the
correct place to change that setting, can you think of any other
settings that may be conflicting? Here are my two config setups:

Default for production:
    coldbox = {
      appName = "Kostizi",
      eventName = "event",
            debugMode = false,
      handlersIndexAutoReload = false,
      configAutoReload = false,

      //Implicit Events
      defaultEvent = "",
      requestStartHandler = "Main.onRequestStart",
      requestEndHandler = "",
      applicationStartHandler = "Main.onAppInit",
      applicationEndHandler = "",
      sessionStartHandler = "",
      sessionEndHandler = "",
      missingTemplateHandler = "",

      //Extension Points
      UDFLibraryFile = "includes/helpers/ApplicationHelper.cfm",
      coldboxExtensionsLocation = "",
      modulesExternalLocation = [],
      pluginsExternalLocation = "",
      viewsExternalLocation = "",
      layoutsExternalLocation = "",
      handlersExternalLocation = "",
      requestContextDecorator = "",

      //Error/Exception Handling
      exceptionHandler = "Main.onException",
      onInvalidEvent = "",
      customErrorTemplate = "",

      //Application Aspects
      handlerCaching = false,
      eventCaching = true,
      proxyReturnCollection = false,
      flashURLPersistScope = "session",

      messagebox_style_override = true

    caches = {
        // Named cache for all coldbox event and view template caching
      template = {
        provider =
        properties = {
          objectDefaultTimeout = 120,
          objectDefaultLastAccessTimeout = 30,
          useLastAccessTimeouts = true,
          freeMemoryPercentageThreshold = 0,
          reapFrequency = 2,
          evictionPolicy = "LRU",
          evictCount = 2,
          maxObjects = 300,
          objectStore = "ConcurrentSoftReferenceStore" //memory sensitive

    //WireBox Integration
    wireBox = {
      enabled = true,

Development overrides:

  function local(){
    coldbox.ConfigAutoReload = true;
    coldbox.HandlersIndexAutoReload = true;
    coldbox.HandlerCaching = false;
    coldbox.EventCaching = false;
    coldbox.debugMode = true;
    coldbox.EnableBugReports = true;
    coldbox.EnableColdboxLogging = false;
    coldbox.useSSL = 0;
    wirebox.singletonReload = true;

I have been using coldbox since sometime around version 2.4 and have
migrated my settings quite a few times. I wouldn't be surprised if we
are using some antiquated settings, or if maybe some of them are
conflicting with each other.

Thanks for your help on this.


They look just like mine jeff. Issue a applicationStop() just in case to clear things up.

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


I am experiencing the exact problem. I can't get my singletons to
reload in DEV. I have it set to

My current workaround is to reinit the framework every time, which is

There has to be something else going on, You can check out the code it runs,but I cannot reproduce this.

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager: