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

Mastering Events and Listeners in CBWIRE

Mastering Events and Listeners in CBWIRE

In CBWIRE, events and listeners are the backbone of building responsive, modular applications without relying heavily on JavaScript. This guide walks you through setting up and using CBWIRE events to create seamless interactions between components, from dispatching events in CFML and frontend templates to listening with Alpine.js and JavaScript. Learn how to make your applications feel dynamic and engaging by effortlessly connecting components. Whether you’re triggering events to update a dashboard or targeting specific parts of your app with dispatchTo, these techniques will empower you to create a modern, interactive CFML experience with ease.

Grant Copley
Grant Copley
November 11, 2024
10 Key Benefits of Hiring a Specialized ColdFusion Consulting Team

10 Key Benefits of Hiring a Specialized ColdFusion Consulting Team

ColdFusion remains a powerful and versatile platform for building dynamic web applications. However, keeping your ColdFusion environment optimized, secure, and scalable requires specialized expertise. Whether managing a long-standing ColdFusion application or planning new development projects, hiring a dedicated ColdFusion consulting and support team can be a game-changer for CTOs, CIOs, and developers. Here's why:

1. Expert Guidance on ColdFusion Web Development

...

Cristobal Escobar
Cristobal Escobar
November 08, 2024
ColdBox Free Tip 5 - Building Named Routes with a Struct

ColdBox Free Tip 5 - Building Named Routes with a Struct

**Did you know ColdBox provides flexible ways to build routes using structs?** In this tip, we’ll cover how to use the `event.buildLink()` and `event.route()` methods for named routes, a feature that’s especially handy when working with dynamic URLs.

Maria Jose Herrera
Maria Jose Herrera
November 07, 2024