Trying to decide whether to use ColdFusion's EHCache implemention or CacheBox? You don't have to choose one or the other! CacheBox is a cache aggregator, which means it lets you use the same standard API to interact with any number of different cache providers-- including EHCache.
To configure an EHCache provider in CacheBox (assumming your using Adobe CF 9.0.1 and up, of course) add the following struct to the "caches" object in your CacheBox config.
myCoolCache = {
provider = "coldbox.system.cache.providers.CFProvider"
}
That's it!
Now you can grab that cache by name from CacheBox and start using it:
cacheBox.getCache("myCoolCache").set("myKey","myValue");
cacheBox.getCache("myCoolCache").get("myKey");
More info here: http://wiki.coldbox.org/wiki/CacheBox.cfm#CF_Providers
P.S. Please note that you can configure more than 1 CFProvider cache engine in your applications that can talk to more than one referenced ColdFusion (EHCache) custom cache. Just use the cacheName property to tell the CFProvider which EHCache instance to use.
Blog
Recent Entries
BoxLang 1.0.0 Beta 27 Launched
We are excited to bring you Beta 27 with enhanced XML handling, new CLI app support, improved error handling, and expanded interoperability with Java and CFML runtimes. We've also added new HTTP event hooks, improved caching strategies, and a streamlined class resolution process to make your applications more performant, even in debug modes.
Get a Free BoxLang+ License with Your ITB 2025 Ticket!
At Ortus Solutions, we are dedicated to delivering the best experience for our Into the Box attendees. This year’s event will be an exciting opportunity to explore BoxLang and modern CFML development, and we want to ensure that attending in person is even more rewarding.
Maria Jose Herrera
Maria Jose Herrera
January
31,
2025
Into the Box 2025 | Plan Your Trip With Us!
Are you ready to join us for Into the Box 2025 from April 30th to May 2nd in Washington, D.C.? Let’s make your trip planning as smooth as possible. Here you’ll find Airfare discounts, Hotel Deals and fun things to do to the the best out of your trip to D.C.
Add Your Comment