6 Free Java Object Cache Products

By Angsuman Chakraborty, Gaea News Network
Sunday, July 30, 2006

This is a comprehensive list of various free Java object cache products with descriptions. This list is for my reference and hopefully yours. The order is irrelevant.

ShiftOne Java Object Cache
“ShiftOne Java Object Cache is a Java library that implements several strict object caching policies, decorators that add behavior, and a light framework for configuring them for an application.”

I couldn’t understand whether it is simply a memory cache or provides disk caching too. It provides monitoring & instrumentation with JMX, Hit/Miss statistics reporting and Hibernate integration.
Link

Whirly Cache
“Whirlycache is a fast, configurable in-memory object cache for Java. It can be used, for example, to speed up a website or an application by caching objects that would otherwise have to be created by querying a database or by another expensive procedure. From the testing that we have done, it appears to be faster than any other Java cache that we have been able to inspect.”
Link

WhirlyCache is simple to use:

//Use the cache manager to create the default cache
Cache c = CacheManager.getInstance().getCache();

//Put an object into the cache
c.store(”yourKeyName”, new WhateverObject());

//Get the object back out of the cache
WhateverObject o = (WhateverObject) c.retrieve(”yourKeyName”);

//Shut down the cache manager
CacheManager.getInstance().shutdown();

Link

JCS - Java Caching System
“JCS is a distributed caching system written in java. It is intended to speed up applications by providing a means to manage cached data of various dynamic natures. Like any caching system, JCS is most useful for high read, low put applications.”

It supports memory management, disk overflow (and defragmentation), thread pool controls etc.

Four types of caches can be plugged into the JCS Composite Cache for any given region: (1) LRU Memory Cache, (2) Indexed Disk Cache, (3) TCP Lateral Cache, and (4) RMI Remote Cache.

JCS doesn’t provide a tag library of web specific mechanisms.
Link

OSCache
“OSCache is a caching solution that includes a JSP tag library and set of classes to perform fine grained dynamic caching of JSP content, servlet responses or arbitrary objects. It provides both in memory and persistent on disk caches, and can allow your site to have graceful error tolerance (eg if an error occurs like your db goes down, you can serve the cached content so people can still surf the site almost without knowing).”

OSCache is a “high performance J2EE caching framework”. It provides in-memory & on-disk caching. OSCache can easily be configured to cluster across multiple boxes. This provides both scalability and failover support without any changes required in your caching code.
Link

EHCache
Ehcache is a java distributed cache for general purpose caching, J2EE and light-weight containers. It features memory and disk stores, replicate by copy and invalidate, listeners, a gzip caching servlet filter etc.

It is apparently a fork of JCS.
Link

JBoss Cache
“JBoss Cache provides two caching APIs to suit your needs. The JBossCache API offers a traditional, tree-structured node-based cache and the JBossCacheAOP API, which builds on the JBossCache API, provides the ability to perform fine-grained replication of Java objects…”

The site has lots of marketing-talk which doesn’t mean much, especially in comparison with other solutions. I am not even sure if it support disk-caching or at least disk-overflow.
Link

Overall I don’t have much input as to the relative merits of these caching solutions as I haven’t used any. I will however use one of them soon. Your input on their relative merits and weakness will be highly appreciated.

None of them appeared to be concerned about data security, so I presume they may be subject to insider attacks.

Discussion
January 31, 2007: 6:03 am

Que raro habláis todos!

September 21, 2006: 3:21 pm

Try https://cache4j.sf.net
simple and fast cache library


Suman Roy
August 9, 2006: 3:42 am

hi,
can anyone give suggestion how I can configure java caching system(JCS)with hibernate in eclipse.

July 31, 2006: 12:10 am

hi there,

i have not used coherence but have heard that TSS, Javalobby among many Financial sites use it. https://www.tangosol.com/html/coherence-overview.shtml

i look forward to hearing from you which one you eventually used and why.

BR,
~A

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :