Blog

Brad Wood

August 01, 2012

Spread the word


Share your thoughts

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.

Add Your Comment

Recent Entries

Into the Box 2024 Last Early Bird Days!

Into the Box 2024 Last Early Bird Days!

Time is ticking, with less than 60 days remaining until the excitement of Into the Box 2024 unfolds! Don't let this golden opportunity slip away; our exclusive Early Bird Pricing is here for a limited time only, available until March 31st. Why wait? Secure your seat now and take advantage of this steal!

Maria Jose Herrera
Maria Jose Herrera
March 20, 2024
Ortus February Newsletter 2024

Ortus February Newsletter 2024

Welcome to Ortus Solutions’ monthly roundup, where we're thrilled to showcase cutting-edge advancements, product updates, and exciting events! Join us as we delve into the latest innovations shaping the future of technology.

Maria Jose Herrera
Maria Jose Herrera
March 06, 2024
Unveiling the Future of CFML Development - 3rd Round of Sessions

Unveiling the Future of CFML Development - 3rd Round of Sessions

Welcome back to our journey into the future of CFML development! As excitement continues to build for Into the Box 2024, we're thrilled to bring you the latest updates on what promises to be a transformative event. Continuing our blog post series, let's delve deeper into the third wave of session releases and discover the key surprises awaiting attendees. Learn More

Maria Jose Herrera
Maria Jose Herrera
March 01, 2024