There is no simple answer to the question of which Java Cache implementation
is the best. It all depends on the use case:
This page introduces our series on software caches in Java application servers.
In that series, we will introduce
Ehcache, Hazelcast, and
Infinispan and shows their specific
strengths and weaknesses in different deployment scenarios.
Ehcache | Hazelcast | Infinispan | |
---|---|---|---|
Support for Distributed Hash Table architecture in peer-to-peer mode. | no | yes | yes |
Support for Fully Replicated architecture in peer-to-peer mode. | yes | no | yes |
Guarantee that the cache does never become inconsistent when atomic operations are called in peer-to-peer mode, even when cache is misconfigured? | yes | yes | no |
Explicit hardware configuration in client-server mode (configure which hardware units hold back-ups for each other). | yes | no | no |
Elastic deployments in client-server mode (grow automatically with the number of servers). | no | yes | yes |
Guarantee that the cache does never become inconsistent when atomic operations are called in client-server mode, even when cache is misconfigured? | no | yes | no |