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

Ehcache

153
134
+ 1
4
Redis

47.9K
36.1K
+ 1
3.9K
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 路 5K views
Needs advice
on
RedisRedis
and
EhcacheEhcache

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 路 3.9K views
Recommends
RedisRedis

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.

https://db-engines.com/en/system/Ehcache%3BRedis

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
Pros of Ehcache
Pros of Redis
  • 1
    Way Faster than Redis and Elasticache Redis
  • 1
    Easy setup
  • 1
    Simpler to run in testing environment
  • 1
    Container doesn't have to be running for local tests
  • 879
    Performance
  • 536
    Super fast
  • 511
    Ease of use
  • 441
    In-memory cache
  • 321
    Advanced key-value cache
  • 190
    Open source
  • 179
    Easy to deploy
  • 163
    Stable
  • 152
    Free
  • 120
    Fast
  • 40
    High-Performance
  • 39
    High Availability
  • 34
    Data Structures
  • 32
    Very Scalable
  • 23
    Replication
  • 20
    Great community
  • 19
    Pub/Sub
  • 17
    "NoSQL" key-value data store
  • 14
    Hashes
  • 12
    Sets
  • 10
    Sorted Sets
  • 9
    Lists
  • 8
    BSD licensed
  • 8
    NoSQL
  • 7
    Async replication
  • 7
    Integrates super easy with Sidekiq for Rails background
  • 7
    Bitmaps
  • 6
    Open Source
  • 6
    Keys with a limited time-to-live
  • 5
    Strings
  • 5
    Lua scripting
  • 4
    Awesomeness for Free!
  • 4
    Hyperloglogs
  • 3
    outstanding performance
  • 3
    Runs server side LUA
  • 3
    Networked
  • 3
    LRU eviction of keys
  • 3
    Written in ANSI C
  • 3
    Feature Rich
  • 3
    Transactions
  • 2
    Data structure server
  • 2
    Performance & ease of use
  • 1
    Existing Laravel Integration
  • 1
    Automatic failover
  • 1
    Easy to use
  • 1
    Object [key/value] size each 500 MB
  • 1
    Simple
  • 1
    Channels concept
  • 1
    Scalable
  • 1
    Temporarily kept on disk
  • 1
    Dont save data if no subscribers are found
  • 0
    Jk

Sign up to add or upvote prosMake informed product decisions

Cons of Ehcache
Cons of Redis
    Be the first to leave a con
    • 14
      Cannot query objects directly
    • 2
      No secondary indexes for non-numeric data types
    • 1
      No WAL

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    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), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.

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

    What companies use Ehcache?
    What companies use Redis?
    See which teams inside your own company are using Ehcache or Redis.
    Sign up for Private StackShareLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Ehcache?
    What tools integrate with Redis?
      No integrations found

      Sign up to get full access to all the tool integrationsMake informed product decisions

      Blog Posts

      Nov 20 2019 at 3:38AM

      OneSignal

      PostgreSQLRedisRuby+8
      8
      4111
      Jun 6 2019 at 5:11PM

      AppSignal

      RedisRubyKafka+9
      15
      1246
      GitHubDockerReact+17
      35
      32105
      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.
      Apache Ignite
      It is a memory-centric distributed database, caching, and processing platform for transactional, analytical, and streaming workloads delivering in-memory speeds at petabyte scale
      Hazelcast
      With its various distributed data structures, distributed caching capabilities, elastic nature, memcache support, integration with Spring and Hibernate and more importantly with so many happy users, Hazelcast is feature-rich, enterprise-ready and developer-friendly in-memory data grid solution.
      guava
      The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.
      GraphQL Cache
      A custom middleware for graphql-ruby that handles key construction and cache reads/writes transparently.
      See all alternatives