Need advice about which tool to choose?Ask the StackShare community!


+ 1

+ 1
Add tool

Ehcache vs Redis: What are the differences?

Ehcache: Java's Most Widely-Used Cache. Ehcache is an open source, standards-based cache for boosting performance, offloading your database, and simplifying scalability. It's the most widely-used Java-based cache because it's robust, proven, and full-featured. Ehcache scales from in-process, with one or more nodes, all the way to mixed in-process/out-of-process configurations with terabyte-sized caches; Redis: An in-memory database that persists on disk. Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

Ehcache belongs to "Cache" category of the tech stack, while Redis can be primarily classified under "In-Memory Databases".

Ehcache and Redis are both open source tools. Redis with 37.1K GitHub stars and 14.3K forks on GitHub appears to be more popular than Ehcache with 1.32K GitHub stars and 452 GitHub forks.

According to the StackShare community, Redis has a broader approval, being mentioned in 3239 company stacks & 1732 developers stacks; compared to Ehcache, which is listed in 4 company stacks and 8 developer stacks.

Advice on Ehcache and Redis
Dadakhalandar S
Sr Solution Specialist at Nokia | 2 upvotes 路 3K views
Needs advice

Hello, I am working on designing the API application for Mobile. We are going to use SpringBoot + Zuul Proxy for API Access Layer and API Services again Spring Boot with REST services exposed. Can you please help me to understand the implementation of REST Caching with ETag or Http Headers cache and how it is different from EhCache for Database side. So if you need to handle caching from REST and Database side, please advise me to get some idea of strategy in implementing it. Thank you so much in advance.

Also for the Java app, which is easy to implement whether Redis or Ehcache, I am new to Redis.

Regards, Dada

See more
Replies (1)
Gerry King
Development Manager at molk | 1 upvotes 路 1.9K views

Redis and Ehcache are server-side caches. Ehcache is used to cache data within a Java application. Redis runs in it's own environment so it survives OOM JVM crashes. You can use Redis with a multitude of languages.

ETAGS and HTTP Headers are mainly used by the client side user agent to cache resources locally.

See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More