ColdBox Object Cache Manager

Hi there,

I'm using CB 3.0.0 beta1 on Railo 3.1

I'm having a problem getting objects to stay in the Object Cache.

In my onRequestStart, I check if an object exists in the cache, and if
it doesnt - add/set it.

Example ::
if( getColdboxOCM().lookup("saxon") ) {
  getColdboxOCM().set("saxon", createObject
('component','library.cfc.saxon').init(), 0);

But, on *every* request, the object gets re-set into the OCM, i.e. the
call to lookup("saxon") is returning false every time.

Any ideas on what am I doing wrong here?


Sorry - my example was missing a “not” … it should read as follows:

if( not getColdboxOCM().lookup(“saxon”) ) {
getColdboxOCM().set(“saxon”, createObject(‘component’,‘library.cfc.saxon’).init(), 0);

This is still a problem for me … objects not persisting in the ColdBox OCM.


Hi Philip,

Please check your settings, coldbox.xml.cfm.

The ConfigAutoReload setting tells the framework to reload the
handlers index but also all of the configuration settings, resource
bundles, cleans the cache and it fires the Application Start Handler.
Again, if you have errors due to your config, then reload it by using
the fwreinit=1 or set this flag to true for development. Be aware that
the application will be reloaded in each request while this setting is
turned on.


Ah, excellent - thanks Sana :slight_smile: