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

Ehcache

84
144
+ 1
4
Memcached

6.5K
4.8K
+ 1
470
Add tool

Ehcache vs Memcached: What are the differences?

Developers describe Ehcache as "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. On the other hand, Memcached is detailed as "High-performance, distributed memory object caching system". 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.

Ehcache belongs to "Cache" category of the tech stack, while Memcached can be primarily classified under "Databases".

Ehcache and Memcached are both open source tools. Memcached with 9K GitHub stars and 2.6K forks on GitHub appears to be more popular than Ehcache with 1.33K GitHub stars and 456 GitHub forks.

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

Advice on Ehcache and Memcached
Francisco José Casasaltas Perales
Needs advice
on
EhcacheEhcacheguavaguava
and
MemcachedMemcached

Hi guys! I need an in-memory key/value storage with a lifespan for each key What do you recommend me to use? I was thinking about using a ConcurrentHashMap, with a scheduled thread evicting keys when apply. In fact, it is a possibility due because the performance is not important. But, on the other side, I have considered using any library such as Memcached, Ehcache, guava...

See more
Replies (1)
Recommends
RedisRedis

Redis can do the same jobs as Memcached, ECache or any other im-memory caching tool and can do them better. - Redis can act as a cache as well. It can store key/value pairs too. In Redis, they can even be up to 512MB. - Redis is better documented than Memcached and ECached. - Supports many data types. (Strings, Hashes, Lists, Sets, Sorted Sets, Geo, Bitmap and HyperLogLog) - Redis provides pub/sub as well. - Redis can be scaled easily horizontally if needed using its own tool Redis Sentinel. - Wide variety of client libraries in almost every language.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Ehcache
Pros of Memcached
  • 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
  • 138
    Fast object cache
  • 128
    High-performance
  • 90
    Stable
  • 65
    Mature
  • 33
    Distributed caching system
  • 11
    Improved response time and throughput
  • 3
    Great for caching HTML
  • 2
    Putta

Sign up to add or upvote prosMake informed product decisions

Cons of Ehcache
Cons of Memcached
    Be the first to leave a con
    • 2
      Only caches simple types

    Sign up to add or upvote consMake informed product decisions

    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 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.

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

    Jobs that mention Ehcache and Memcached as a desired skillset
    What companies use Ehcache?
    What companies use Memcached?
    See which teams inside your own company are using Ehcache or Memcached.
    Sign up for StackShare EnterpriseLearn More

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

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

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

      Blog Posts

      Dec 22 2020 at 9:26PM

      Pinterest

      Amazon EC2MemcachedC lang+4
      10
      2476
      Jun 6 2019 at 5:11PM

      AppSignal

      RedisRubyKafka+9
      15
      1268
      GitHubDockerReact+17
      35
      33371
      GitHubPythonNode.js+47
      53
      70770
      JavaScriptGitHubNode.js+26
      19
      4766
      JavaScriptGitHubPython+42
      52
      20640
      What are some alternatives to Ehcache and Memcached?
      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.
      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.
      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