I Had a Doubt (About CFGroovy2 and Ehcache)

A couple months ago I added Ehcache support to CFGroovy2 as an alternative to the simple HashMap/WeakReference caching that had been there since it's inception.  I waffled a little bit at the time, but it seemed like the right thing to do.  I've changed my mind, and removed the Ehcache functionality in the latest build.  If you upgrade and were using Ehcache before, you'll need to either restart your container or manually delete server.cfgroovy.

The <g:manager> tag that I added is still supported in it's entirety, though it's reporting capabilities were really designed for the Ehcache mechanism, so it's not of as much use with the simple caching mechanism.  However, you can still clear the cache using it, if you wish.

Another minor tweak has also snuck in: better wrapping of output streams.  The Rhino implementation apparently requires a java.io.PrintWriter for it's Writer, where I'd been supplying a java.io.StringWriter.  I was programming against the API, but Rhino is more strict.  However, I've changed it to a java.io.PrintWriter so Rhino will work.  Other languages that only required the Writer type continue to work as before.

2 responses to “I Had a Doubt (About CFGroovy2 and Ehcache)”

  1. Mike Brunt

    Barney, would you expand on the reason you removed ehcache?