Hello,
I recently upgraded to build 114 and now the logs are filling up with
the Cache is not registered error.
I've read the older post on this topic and none seem to address this
issue.
The error is being thrown from all different types of browsers, and in
different locations on the site.
Error: Cache template is not registered.
Error Detail: Valid cache names are
Thrown From: ColdBox\system\cache\CacheFactory.cfc:191
System win 7, CF9, coldbox3 RC1 build 114
Seems to be saying that the cache named 'template' is not registered.
But I believe 'template' it has been registered as seen below in the
CacheBox.cfc that is mapped to in the Coldbox.cfc.
Can someone tell me where ColdBox\system\cache\CacheFactory.cfc:191 is
expecting to find the cache registration?
Should I register it somewhere else?
Am I reading it wrong?
Although the logs are filling up with this error, I have not been able
to make it happen or capture a stack trace.
In the application config folder, Coldbox.cfc file the cachebox is
mapped as
//cacheEngine
cacheBox =
{
configFile = "config/CacheBox"
};
Also in the application config folder, in the CacheBox.cfc (the
template cache is registered)
<cfcomponent output="false">
<cfscript>
/**
* Configure CacheBox for ColdBox Application Operation
*/
function configure(){
// The CacheBox configuration structure DSL
cacheBox = {
// LogBox config already in coldbox app, not needed
// logBoxConfig = "coldbox.system.web.config.LogBox",
// Scope registration, automatically register the cachebox factory
instance on any CF scope
// By default it registeres itself on server scope
scopeRegistration = {
enabled = true,
scope = "application",
key = "cacheBox"
},
// 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.CacheBoxColdBoxProvider",
properties = {
objectDefaultTimeout = 120,
objectDefaultLastAccessTimeout = 30,
useLastAccessTimeouts = true,
freeMemoryPercentageThreshold = 0,
reapFrequency = 2,
evictionPolicy = "LRU",
evictCount = 2,
maxObjects = 300,
objectStore = "ConcurrentSoftReferenceStore" //memory sensitive
}
}
}
};
}
</cfscript>
</cfcomponent>