Ehcache vs Redis

Ehcache
Ehcache

39
7
4
Redis
Redis

13.1K
4.5K
3.7K
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.

What is Ehcache?

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.

What is Redis?

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.

Want advice about which of these to choose?Ask the StackShare community!

Why do developers choose Ehcache?
Why do developers choose Redis?
What are the cons of using Ehcache?
What are the cons of using Redis?
    Be the first to leave a con
    What companies use Ehcache?
    What companies use Redis?
    What are some alternatives to Ehcache and Redis?
    Memcached
    Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
    GraphQL Cache
    A custom middleware for graphql-ruby that handles key construction and cache reads/writes transparently.
    See all alternatives
    What tools integrate with Ehcache?
    What tools integrate with Redis?
      No integrations found
        No integrations found
        Decisions about Ehcache and Redis
        No stack decisions found
        Interest over time
        Reviews of Ehcache and Redis
        Review ofRedisRedis

        Redis is a good caching tool for a cluster, but our application had performance issues while using Aws Elasticache Redis since some page had 3000 cache hits per a page load and Redis just couldn't quickly process them all in once + latency and object deseialization time - page load took 8-9 seconds. We create a custom hybrid caching based on Redis and EhCache which worked great for our goals. Check it out on github, it's called HybriCache - https://github.com/batir-akhmerov/hybricache.

        How developers use Ehcache and Redis
        Avatar of Cloudcraft
        Cloudcraft uses RedisRedis

        Redis is used for storing all ephemeral (that's data you don't necessarily want to store permanently) user data, such as mapping of session IDs (stored in cookies) to current session variables at Cloudcraft.co. The many datastructures supported by Redis also makes it an excellent caching and realtime statistics layer. It doesn't hurt that the author, Antirez, is the nicest guy ever! These days, I would be really hard pressed to find any situation where I would pick something like Memcached over Redis.

        Avatar of Trello
        Trello uses RedisRedis

        Trello uses Redis for ephemeral data that needs to be shared between server processes but not persisted to disk. Things like the activity level of a session or a temporary OpenID key are stored in Redis, and the application is built to recover gracefully if any of these (or all of them) are lost. We run with allkeys-lru enabled and about five times as much space as its actual working set needs, so Redis automatically discards data that hasn’t been accessed lately, and reconstructs it when necessary.

        Avatar of Stack Exchange
        Stack Exchange uses RedisRedis

        The UI has message inbox that is sent a message when you get a new badge, receive a message, significant event, etc. Done using WebSockets and is powered by redis. Redis has 2 slaves, SQL has 2 replicas, tag engine has 3 nodes, elastic has 3 nodes - any other service has high availability as well (and exists in both data centers).

        Avatar of Brandon Adams
        Brandon Adams uses RedisRedis

        Redis makes certain operations very easy. When I need a high-availability store, I typically look elsewhere, but for rapid development with the ability to land on your feet in prod, Redis is great. The available data types make it easy to build non-trivial indexes that would require complex queries in postgres.

        Avatar of Kent Steiner
        Kent Steiner uses RedisRedis

        I use Redis for cacheing, data storage, mining and augmentation, proprietary distributed event system for disparate apps and services to talk to each other, and more. Redis has some very useful native data types for tracking, slicing and dicing information.

        How much does Ehcache cost?
        How much does Redis cost?
        Pricing unavailable
        Pricing unavailable
        News about Ehcache
        More news