Skip to content
SPECIFICTION
Get listed

Ehcache vs Garnet

Ehcache

ehcache.org

Garnet

microsoft.github.io

Side by side

FigureEhcacheGarnet
Price fromFreeFree
Free planYesYes
Free trial——
Open sourceYes—
Windows—Yes
macOS—Yes
Linux—Yes
APIYes—
Self-hostedYesYes
Plans published32
Spec score · Caching Software8.5 (#4)8.0 (#7)
PurposeEhcache is an open-source, standards-based Java cache that boosts performance, offloads databases, and simplifies scalability.Garnet is a remote cache-store from Microsoft Research designed for high performance, extensibility, and low latency.

Plans

Ehcache

  • EhcacheFree
  • Ehcache open-sourceFree
  • Enterprise EhcachePriced on request

Ehcache pricing →

Garnet

  • GarnetFree
  • Azure Cosmos DB Garnet CachePriced on request

Garnet pricing →

In their own words

Ehcache

Ehcache is a free, open-source Java caching library for keeping application data, database results, and web pages available to applications. It is designed to improve performance, reduce database work, and support scaling. It can run inside an application or in mixed in-process and out-of-process deployments, including terabyte-sized caches. Ehcache 3 supports off-heap storage, including configurations that rely on it exclusively, 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, and data can be shared between application instances using Terracotta clustered storage. Ehcache 3.11 also allows caches to share resources. It supports JTA-managed XA transactions, including two-phase commit and crash recovery, but documents Read-Committed as the only supported isolation level and Bitronix 2.1.4 as the only tested transaction manager. Ehcache 3.11 requires Java 8 or later and is the last release line to support Java 8. The license is Apache 2.0.

Visit ehcache.org

Garnet

Garnet is a free remote cache-store from Microsoft Research for self-hosted use on Linux, macOS, and Windows. It uses RESP and works with many unmodified Redis clients, including StackExchange.Redis; documented libraries also include Jedis, Redisson, redis-py, node_redis, and go-redis. Its data APIs cover strings, lists, hashes, sets, sorted sets, geo operations, HyperLogLog, bitmaps, ACLs, pub/sub, transactions, and Lua scripting. Garnet can store datasets larger than memory on local or cloud storage and supports checkpointing and recovery. Multi-node mode provides sharding, state migration, and replication. Developers can register C# data structures and read-modify-write operations through its custom operator framework. TLS/SSL and password-based RESP authentication are supported. DiskANN vector database support and Bf-Tree range indexes are marked preview. Garnet is MIT-licensed, but is not intended as a fully compatible Redis replacement and does not support Redis modules. The self-hosted plan is free; you manage infrastructure, updates, and operations. The managed Azure Cosmos DB Garnet Cache is in expanded Private Preview, with no price listed.

Visit microsoft.github.io