Questions tagged [ehcache]

Ehcache is an open source, standards compliant Java-based cache used to boost performance, offload the database and simplify scalability.

Ehcache is robust, proven and full-featured, which has made it the most popular Java-based cache with 100,000’s of production deployments.

It can scale from an in-process cache on one or more nodes through to a mixed in-process/out-of-process configuration capable of terabyte-sized caches. The open source Terracotta Server Array snaps in to provide a coherent distributed cache.

Ehcache is actively developed, maintained and supported as a professional open source project by Terracotta, Inc. and is available under an Apache 2 license.

For more information, see the EHCache website.

2379 questions
20
votes
2 answers

What are the best Cache practices in ehcache or spring cache for spring MVC?

Planning to implement cache mechanism for static data in spring web based application, can any one explain which is the best and how it works? EhCache Spring Cache
Delli Kilari
  • 988
  • 3
  • 14
  • 31
19
votes
3 answers

Is it possible to use multiple ehcache.xml (in different projects, same war)?

I have a services project and a web project. I need to have eh-cache in both projects. The idea is that if the service project is updated, it's cache-related changes (like keys and invalidation rules) will also be available, while no changes are…
Ivaylo Slavov
  • 8,839
  • 12
  • 65
  • 108
19
votes
2 answers

The configured limit of 1.000 object references was reached while attempting to calculate the size of the object graph

I have a jhipster project and I added some entities. My services are very slow because this warning message: The configured limit of 1.000 object references was reached while attempting to calculate the size of the object graph. Severe performance…
Vítor Nóbrega
  • 1,219
  • 4
  • 26
  • 53
19
votes
1 answer

What does Spring's @Cacheable do when placed on a method returning a list?

I've looked everywhere online for a simple answer to the above question, and just can't find it. I have a method like: @Cacheable(cacheNames = "objects") public List get() { .. } I'm using EhCache 2.10.0 with Spring Framework 4.2.1, and I…
ben3000
  • 4,629
  • 6
  • 24
  • 43
19
votes
3 answers

Many concurrent reads + one write cause ObjectNotFoundException due to ehcache

I use Hibernate 3.6.8, ehcache 2.4.5 (also tried with latest 2.8.0), jvm 1.6.0_22 on a high traffic site, and sometimes I experience ObjectNotFoundException: No row with the given identifier exists: [com.example.Foo#123]` when a new Foo (in this…
cherouvim
  • 31,725
  • 15
  • 104
  • 153
18
votes
3 answers

Do we need terracotta on top of ehcache for clustering?

I am doing to a proof of concept using ehcache as the cache provider. Read somewhere saying we need terracotta server running, ALONG WITH ehcache to provide clustering. Does ehcache alone provide clustering service or we need terracotta…
Venkat Teki
  • 2,233
  • 4
  • 21
  • 28
18
votes
1 answer

What does the EH in EHCache stand for?

Just out of idle curiosity and Google didn't give me an answer, but what does the EH stand for in EHCache?
slashnick
  • 26,167
  • 10
  • 55
  • 67
18
votes
3 answers

EhCache + Hibernate Cache is not alive

After configuring EhCache v2.4.5 as the second level cache for hibernate v3.6.7 I get the following error while trying to load all objects of a particular entity using hibernate session. (There is no error for loading the objects for the first…
Saffar
  • 520
  • 1
  • 5
  • 13
18
votes
3 answers

What are the Maven dependencies to use hibernate, hibernate annotations, and ehcache?

I would like to update my Maven pom.xml with the latest hibernate, hibernate-annotations, and ehcache dependencies. I read the hibernate download page and the ehcache donwload page. All my tries at interpreting it seem to fail. Can someone write out…
Thomas
  • 435
  • 1
  • 5
  • 12
17
votes
1 answer

Hibernate & EHCache : how does maxElementsInMemory work?

I've configured EHCache with a defaultCache (for elements), a StandardQueryCache (for queries) and UpdateTimestampsCache (for what I believe is to keep track of database updates...but I don't really get what it excactly does). I've set the…
sbrattla
  • 5,274
  • 3
  • 39
  • 63
16
votes
1 answer

Write-Behind Cache for JPA

It would appear from searching around here and the web at large that it is not possible to implement EHCache as a write-behind cache for Hibernate, as that would require substantial changes to the Hibernate code. Are there any other solutions…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
16
votes
6 answers

Reload/Refresh cache in spring boot

I am using Spring Boot and for caching I am using Ehcache. It's working fine till now. But now I have to reload / refresh so how can I do this so that my application will not be having any downtime. I have tried many ways in Spring Ehcache…
Shubuu
  • 161
  • 1
  • 1
  • 5
16
votes
2 answers

How to configure JPA 2.0 with Hibernate 3.5.2 to use EHCache as a Level 2 cache and query cache?

I found some instructions how to configure pure hibernate to use EHCache. But I can't find any instructions how to configure JPA2.0 EntityManager to use cache. Hibernate 3.5.2 is my JPA2.0 provider. edit// Is @Cacheable(true) enough for entity? Or…
Piotr Gwiazda
  • 12,080
  • 13
  • 60
  • 91
16
votes
3 answers

EhCache default cache in java

I have this configuration for ehCache:
user349302
  • 3,491
  • 7
  • 27
  • 31
16
votes
6 answers

CacheManager No Bean Found - Not Trying to setup any Cache

I'm getting a no CacheManager bean found... But i have not tried to do anything with CacheManager! Here's my error! org.springframework.beans.factory.BeanCreationException: Error creating bean with name…
tehras
  • 741
  • 1
  • 7
  • 19