Q:

Best cache framework for Java

I need to implement a cache solution in java for a cluster of 9 servers with web applications. I saw apache JCS, seems old, do you know another open source solution?

A:

You can try to look at Terracotta framework
Or you can use distributed Ehcache

A:

I think in order to use distributed EhCache you need a commercial Terracotta license.
Another alternative would be memCached (see: http://memcached.org) which does not require commercial license and its widely used by high traffic web sites like YouTube, LiveJournal, Flikr, Wikipedia, etc... 
Good article on memcached:
Use Memcached for Java enterprise performance, Part 1: Architecture and setup http://www.javaworld.com/javaworld/jw-04-2012/120418-memcached-for-java-enterprise-performance.html
Use Memcached for Java enterprise performance, Part 2: Database-driven web apps http://www.javaworld.com/javaworld/jw-05-2012/120515-memcached-for-java-enterprise-performance-2.html

A:

Correction, you do not need a commercial license to do a distributed cache with Terracotta's Ehcache. Ehcache lets you do just a few nodes in a cluster, one of them being the TSA if I remember correctly.
Memcache is purely a caching layer that isn't persistent to disk, Terracotta's Ehcache is.

As for when it comes to Java, Terracotta's Ehcache is off the jave heap, this lets you have as big of a cache as you want depending on the amount of memory your server has. They're working with single JVMs that have 4TB heap sizes w/ no garbage collection at all. Memcache doesn't have this off heap feature at all.
Downside, if your app isn't Java, Terracotta will be a lot of work- Terracotta is primarily Java based.
I just met these guys at JavaOne this last week, so I got a lot of good information from them.

