CacheBox on Beta 3.5 registering 2 railo provider caches as the same cache.

19 views
Skip to first unread message

Ade

unread,
Feb 11, 2012, 10:50:01 AM2/11/12
to ColdBox Platform
I can see what i am doing wrong here.


I have this snippet in my cachebox.cfc

cacheBox.caches = {
//need to set up an eh cache lite called templte to use this
template = {
provider = "coldbox.system.cache.providers.RailoColdBoxProvider"
},
object = {
provider = "coldbox.system.cache.providers.RailoColdBoxProvider"
}
};

In the monitor i have 3 caches registered. default,template and object
However template and object have exactly the same items in them with
the same values.
Also on cachebox monitor the template cache under "Cache
Configuration" shows as having cachename=object

When i do this
objectCache = controller.getColdboxOCM("object");
//templateCache = controller.getColdboxOCM("template");
objectCache.clearAll();

in onAppInit the template cache also clears too.

So it looks like i have 2 registered caches but they are using the
same underlying cache.

I have specified them as "eh cache lite" caches in Railo. Is Railo
only providing 1 underlying cache with "eh cache lite"? If so why does
the monitoring tool have it as cachename=object

Railo 3.3
Coldbox 3.5 Beta


Thanks

Luis Majano

unread,
Feb 11, 2012, 12:49:45 PM2/11/12
to col...@googlegroups.com
If you read the RailoColdBoxProvider docs: http://wiki.coldbox.org/wiki/CacheBox.cfm#Railo_Providers
You can pass another property into the provider called "cachename" so you can tell the provider what underlying railo cache to talk to
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To post to this group, send email to col...@googlegroups.com
To unsubscribe from this group, send email to coldbox-u...@googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/coldbox
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org

Ade

unread,
Feb 17, 2012, 9:25:48 AM2/17/12
to ColdBox Platform
Beautiful, thanks Luis

cacheBox.caches = {
template = {
provider =
"coldbox.system.cache.providers.RailoColdBoxProvider",
properties = {cacheName = "template"}
},
object = {
provider =
"coldbox.system.cache.providers.RailoColdBoxProvider",//uses the
default object cache by default
properties = {cacheName = "object"}
}
};
Reply all
Reply to author
Forward
0 new messages