Using latest 3.0 Cbox and included cachebox
I have a rendered view
#renderView(view='structure/modules/
headerPromoBox',cache=true,cacheTimeout=10)#
works fine with cache=false and worked fine when true for the original
cache engine
I needed to modify setQuiet in cfprovider
i.e.
var cacheConfig = getConfiguration();
if( findnocase("string",
arguments.lastAccessTimeout.getClass().getName() ) ){
if(len(arguments.lastAccessTimeout) == 0){
arguments.lastAccessTimeout =
cacheConfig.OBJECTDEFAULTLASTACCESSTIMEOUT;
}
arguments.lastAccessTimeout =
createTimeSpan(0,0,arguments.lastAccessTimeout,0);
}
as arguments.lastAccessTimeout would be an empty string.
Is this a config issue i am overlooking?
Here is my cachebox config
function configure(){
// The CacheBox configuration structure DSL
cacheBox = {
// LogBox config already in coldbox app, not needed
// logBoxConfig = "coldbox.system.web.config.LogBox",
// The defaultCache has an implicit name "default" which is a
reserved cache name
// It also has a default provider of cachebox which cannot be
changed.
// All timeouts are in minutes
defaultCache = {
objectDefaultTimeout = 120, //two hours default
objectDefaultLastAccessTimeout = 30, //30 minutes idle time
useLastAccessTimeouts = true,
reapFrequency = 2,
freeMemoryPercentageThreshold = 0,
evictionPolicy = "LRU",
evictCount = 1,
maxObjects = 300,
objectStore = "ConcurrentStore", //guaranteed objects
coldboxEnabled = true
},
// Register all the custom named caches you like here
caches = {
// Named cache for all coldbox event and view template caching
template = {
provider = "coldbox.system.cache.providers.CFColdBoxProvider",
properties = {
objectDefaultTimeout = 120,
objectDefaultLastAccessTimeout = 30,
useLastAccessTimeouts = true,
freeMemoryPercentageThreshold = 0,
reapFrequency = 2,
evictionPolicy = "LRU",
evictCount = 2,
maxObjects = 300,
objectStore = "ConcurrentSoftReferenceStore" //memory sensitive
}
}
}
};
}