I'm using CB 3 R1. On my OnAppInit I set sever values/objects into
the coldbox cache like this:
getColdBoxOCM().set( 'qStates', utilService.getStates(), 0 );
getColdBoxOCM().set( 'ListOfTaxableItems',
utilService.getItemsWithFee( getSetting('WasteFeeItems') ), 0 );
This works fine and these items and their correct values are all
listed in the CacheBox debug panel.
In my OnSessionStart I set a user bean into sessionstorage with a
composed shoppingcart object. Again this always works fine and as
expected, except that one of the properties that I inject into the
bean is from the cache above and I do so like this:
<cfproperty name="ListOfTaxableItems" inject="ocm:ListOfTaxableItems" /
So here's the problem: the very first time I start up the app,
everything works as planned except a blank string gets injected into
the 'ListOfTaxableItems' property - even though the cachebox debug
panel properly shows the correct string of items in it.
Subsequent sessions all work fine and if I clear all session variables
in the browser and fwreinit the app all work fine. However, on that
initial app startup the very first user created NEVER gets any item
properly injected from the cb cache. To be clear: everything else
gets properly injected, it's just any item coming from the cache gets
set as a blank string.
Although it oughtn't matter, I tried setting those items in my
onDIComplete method instead but I get the same results (first one is
blank string, all others work fine).
Andy