- Home
- Caching Software
- Ehcache
Ehcache
What it is
Ehcache is a free, open-source Java cache intended to improve application performance, reduce database load, and support scalability. It can run in-process or in mixed in-process and out-of-process deployments, including terabyte-sized caches. Ehcache 3 supports off-heap storage, including configurations that use off-heap storage alone, and is compatible with the JCache API defined by JSR-107. The project describes Spring Caching and Hibernate integration through javax.cache support. Configuration is available through XML or the Java API. Ehcache can use Terracotta clustered storage to share cache data across application instances, and Ehcache 3.11 adds resource sharing between caches. It also supports JTA-managed XA transactions, including two-phase commit and crash recovery. For XA caches, the documented isolation level is Read-Committed, and Bitronix 2.1.4 is the only tested transaction manager. Ehcache 3.11 requires Java 8 or later and is the final release line to support Java 8. The project directs users with unanswered questions to its support forums; its downloads page says FOSS Ehcache 2.x is no longer actively maintained.
For and against
For
- Supports in-process and mixed deployment models
- Ehcache 3 works with JCache (JSR-107)
- Offers XML and Java API configuration
- Can share cache data across application instances
- Supports JTA-managed XA transactions
Against
- Ehcache 3.11 is the final line supporting Java 8
- XA caches document only Read-Committed isolation
- Bitronix 2.1.4 is the only tested transaction manager
- FOSS Ehcache 2.x is no longer actively maintained
The verdict
Ehcache offers Java caching options ranging from off-heap storage to clustered data sharing and transaction support. Check the version and transaction constraints against your application requirements.
Who it suits
It suits Java developers who need configurable caching for application data, database results, or web pages, including deployments that use off-heap or clustered storage. Teams using XA transactions should note the documented isolation and tested transaction-manager limits.
Plans and prices
Ehcache open-source
Apache 2.0 licensed · self-hosted Java cache
Read 15 Oct 2026 · ehcache.org
Ehcache
Open source · Apache 2.0 license
Read 3 Oct 2026 · ehcache.org
Enterprise Ehcache
Commercial licensing and support · enterprise features
Read 15 Oct 2026 · ehcache.org
On the record
- API documentation
- The project publishes JavaDoc for core, clustered and transaction modules plus older 2.x APIs.ehcache.org · read 15 Oct 2026
- Cache sharing
- Ehcache 3.11 adds the ability to share resources between caches.ehcache.org · read 3 Oct 2026
- Cache-through extensibility
- CacheLoaderWriter combines read-through loading and write-through persistence callbacks.ehcache.org · read 15 Oct 2026
- Clustering
- Ehcache can use Terracotta clustered storage to share cache data across application instances.ehcache.org · read 3 Oct 2026
- Configuration
- Ehcache supports XML configuration as well as configuration through its Java API.ehcache.org · read 3 Oct 2026
- Deployment model
- The project supports in-process caching and mixed in-process/out-of-process deployments with caches sized for terabytes.ehcache.org · read 15 Oct 2026
- Deployment scale
- It supports in-process and mixed in-process/out-of-process deployments, including terabyte-sized caches.ehcache.org · read 3 Oct 2026
- Distributed caching
- Terracotta integration enables clustered caches across distributed nodes.ehcache.org · read 15 Oct 2026
- Documentation depth
- The current guide covers getting started, tiering, XML, JCache, clustering, expiry, resilience, serializers, transactions, writers, listeners, OSGi and tuning.ehcache.org · read 15 Oct 2026
- Downloads
- Official downloads include Ehcache 3.11 jars, clustering kits and the older 2.10.8 archive.ehcache.org · read 15 Oct 2026
- Eviction
- The product provides configurable eviction strategies for deciding which entries leave a cache.ehcache.org · read 15 Oct 2026
- Expiration
- Cache entries can use configurable expiration policies, including time-to-live settings.ehcache.org · read 15 Oct 2026
- Framework integrations
- The project describes out-of-the-box Spring Caching and Hibernate integration through javax.cache support.ehcache.org · read 3 Oct 2026
- Installation
- Ehcache 3.11.1 can be added with Maven or Gradle using org.ehcache:ehcache:3.11.1.ehcache.org · read 15 Oct 2026
- Java requirement
- Ehcache 3.11 requires Java 8 or later, and is the last Ehcache release line to support Java 8.ehcache.org · read 3 Oct 2026
- JCache compatibility
- Ehcache 3 implements the JSR-107 JCache API so applications can use the standard cache interfaces.ehcache.org · read 15 Oct 2026
- Licence
- The open-source project is distributed under the Apache License 2.0.ehcache.org · read 15 Oct 2026
- Limit: administration and recovery
- Gartner reviewers criticized difficult debugging and weaker administration, data-recovery and export/import capabilities.gartner.com · read 15 Oct 2026