align-toparrow-leftarrow-rightbackbellblockcalendarcamerachatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-crosscrosseditfacebookglobegoogleimagesinstagramlocation-pinmagnifying-glassmailmoremuplabelShape 3 + Rectangle 1outlookpersonplusImported LayersImported LayersImported Layersshieldstartwitteryahoo

Re: [ljc] Open Source Java Caching APIs

From: Stephen H.
Sent on: Wednesday, May 30, 2012 5:18 PM

We've been using ehcache in a similar way for a couple of years and haven't had too many problems with it. We're running using it for a persistent, replicated cache across 3 servers (using the rmi-replication settings) maxing out around 2-3GB of data.

The biggest problem we encountered was the documentation to be honest. Not sure if it's improved since, but we found that the docs were scattered randomly across the terracotta (ehcache owner) website and trying to find out how to setup a simple, standalone cache was much more painful than it should have been. Once we found the relevant docs it was pretty straight-forward to setup (I can send you our settings if it helps).

We had a similar problem that we couldn't find any proven alternatives that have been kept upto date :-/

If you're using spring and want to make integration as easy as possible you could check out the @Cacheable annotations in spring 3.1 (haven't used them personally but it looks like quite a nice solution).

As for nosql, that's definitely another option but I think something like Voldemort would be overkill for what you need, especially in terms of admin overhead. Depending on your object size something simple like memcached (or CouchBase if you need persistence) would probably be a better bet. I've heard good things about redis too as a simple solution.


On 30 May[masked]:45, James Bowkett <[address removed]> wrote:
Hi All,

I am looking to create a caching layer in my application.  My application has model objects that require a few costly, star-like SQL queries to construct, this data is only ever added-to once per week.  So I plan to create the whole object population once and use an object cache for fast key-based lookup and I'm looking for some opinions/recommendations/conjecture on appropriate technologies.  

I really only want a HashMap that pages its values to disk (I'm not afraid to write it myself, but I'd rather use an open source API (the budget for this is my time only) if there's one available and it's nice and lightweight)

Has anyone used Ehcache?....what are your thoughts?....has anyone used any of the other open source alternatives?....Are there any alternatives that I should be looking at instead? 

I'm finding it hard to find many APIs out there (most of the projects listed here: are really old).  has caching fallen out of favour in preference for some other way of doing things?...or is everyone using things like NoSQL to distribute their caches? (If so, is there a particular NoSQL toolset that would be most appropriate for me?...Should I be looking at something like Voldemort?)



P.S. As a footnote, this is the history of caching APIs as far as I can make it out:

As far as I can tell, there was a JSR for this (107) which looks like it's been dormant for a little over 10 years, the reference implementation for this was JCache, and this came out of some functionality in Oracle 9i, this looks like it was then superseded by Apache's JCS (Java Caching System), although all of these now look like fairly dormant projects (JCS last release was 2007).

It looks like Ehcache was originally a fork of JCS (, (indeed JCS claims to be faster) but is Ehcache now the only open source caching solution out there that's still under active development?

Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by James Bowkett ([address removed]) from LJC - London Java Community.
To learn more about James Bowkett, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

  • Our Blog

    Read the latest news from the LJC

  • RecWorks Ltd

    Fixing Tech Recruitment using the Power of Community

  • jClarity

    Java/JVM Performance Analysis Tools & mentoring for Java related matters

  • LJC Aggrity

    Our LJC Aggrity site contains blog posts from our members

  • LJC Book Club

    Our Book club with book reviews from our members

  • Devoxx UK

    Java Community Conference in collaboration with the LJC, 8-10th June 16

  • SkillsMatter

    "Host, help organise, promote, film many of our meetings."

  • IBM

    Build Enterprise-grade apps at start-up speed.

  • New Relic

    New Relic makes sense of billions of metrics a day in real time.

  • Hazelcast

    Hazelcast is the leader in operating in-memory computing.

  • Java.Net

    We are an official Java User Group recognised by Oracle's JUG program

  • JRebel

    Free 3 month J-Rebel license.

  • O'Reilly

    40% discount on printed books and 50% on e-books.

  • Craft Rebellion

    Your choice of fresh craft beer, delivered. For 10% off use ‘LJC'

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy