Using Ehcache SampledCache

SampledCache is an implementation of CachedMBean and exposes Cache Statistics. It’s a Cache decorator for getting statistics for a Cache. It’s fairly simple to use, let see a quick sample The complete code can be found at EhcacheStatsDemo.java public static void ehCacheStatsDemo() throws NotCompliantMBeanException { CacheManager cacheManager = CacheManager.newInstance(); Ehcache cache = cacheManager.addCacheIfAbsent("testCache"); SampledCache sampledCache […]

Continue reading


Getting Started with Ehcache

Ehcache is a widely used caching system in Java world. Have been seeing requests for a simple getting started tutorial for the Ehcache. Ehcache is fairly simple to use. Pre-requisites Java 6+ If it’s a maven project, add the following entry in your pom.xml <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> <version>2.9.0</version> </dependency> If it’s simple Java project in […]

Continue reading


Caching and Database Offloading – Best of both worlds with Terracotta Darwin Release

Abstract The Terracotta Darwin release a feature packed release. I love to call it a Developer’s delight. Integrating Terracotta with existing apps has been simplified a lot with Express Mode. In this series we shall see some touch upon some of the new features of the Darwin release How is this post organized? We shall […]

Continue reading


So you want Distributed, Scalable and Highly Available Cache?

Abstract So you want Distributed, Scalable and Highly Available Cache? If yes, then this is the right place for you. The Terracotta Ehcache release has these features inbuilt. The Express Installation mode has simplified Terracotta integration in your application. How this post is organized First we shall start with simple standalone cache and then see […]

Continue reading