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
16
votes
4 answers

How to enable logging of Ehcache

In my Spring + Hibernate project, I was doing logging by SLF4J 1.6.4 with LogBack. Now, I've added Ehcache 2.2.0 (through ehcache-spring-annotations-1.1.3). The caching seems to be working as the method, annotated with @Cacheable, no longer being…
Tamim
  • 173
  • 1
  • 1
  • 6
15
votes
2 answers

Ehcache & MultiThreading

Does ehcache support multi-threading by default or does it require any configuration changes? On multi threading my application with Ehcache i found that the DB hit count is actually increasing i.e. there is no global cache available for all the…
hakish
  • 3,990
  • 7
  • 39
  • 56
15
votes
2 answers

Clustered hibernate cache with ehcache: nonstrict vs. strict read write

What is the real difference between nonstrict-read-write and read-write? I can read ehcache and Hibernate docs, but as far as I can see they only say that "read-write is better if you do updates". I find it unsatisfactory. I may have an issue with…
Konrad Garus
  • 53,145
  • 43
  • 157
  • 230
15
votes
3 answers

Spring boot caching in @Service class does not work

I have problems with save some values in @Service method. My code: @Service(value = "SettingsService") public class SettingsService { ... public String getGlobalSettingsValue(Settings setting) { getTotalEhCacheSize(); …
CSniper
  • 333
  • 2
  • 4
  • 14
15
votes
4 answers

spring cache - Null key returned for cache operation

I have been working with Spring Cache Abstraction and Ehcache. I'm using the @Cacheable annotation on a target method like so: @Component public class DataService { @Cacheable(value="movieFindCache", key="#name") public String…
Green Lei
  • 3,150
  • 2
  • 20
  • 25
15
votes
2 answers

Unable to resolve name [org.hibernate.cache.ehcache.EhCacheRegionFactory] as strategy [org.hibernate.cache.spi.RegionFactory]

I was trying to upgrade my Spring and Hibernate version. I was using hibernate 3 and now I have upgraded to hibernate 4.3.6. After upgrading I am getting a weird issue in ehcache implementation. As I have upgraded to hibernate 4, i have added one…
santu
  • 665
  • 2
  • 7
  • 23
15
votes
5 answers

How update/remove an item already cached within a collection of items

I am working with Spring and EhCache I have the following method @Override @Cacheable(value="products", key="#root.target.PRODUCTS") public Set findAll() { return new LinkedHashSet<>(this.productRepository.findAll()); } I have other…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
15
votes
4 answers

ehcache configuration in Spring framework

I am trying to load some context from an RSS feed and pass it as a cache to the client using ehcache library in spring. here is my code : import org.springframework.cache.annotation.Cacheable; @Service public class GlossaryReaderService { …
user261002
  • 2,182
  • 10
  • 46
  • 73
15
votes
2 answers

Difference between ehcache and ehcache-core

I am beginner for ehcache v/s ehcache-core in Spring framework, my pom.xml used ehcache version 1.5.0 net.sf.ehcache ehcache 1.5.0 Now, it will need to update…
user2317982
  • 185
  • 1
  • 7
14
votes
2 answers

Using ehcache 3 with Spring Annotations (not using Spring Boot)

I'm trying to get Ehcache 3 working with Spring 4 without using Spring boot. Here is a working example out there which uses Spring Boot, but I'm working on an existing application which is not using Spring Boot. The problem is that…
Håvard Geithus
  • 5,544
  • 7
  • 36
  • 51
14
votes
3 answers

ehcache warning message " No configuration found"

I have got following warning when the application start up. 2009-05-13 09:19:41,171 WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the…
nayakam
  • 4,149
  • 7
  • 42
  • 62
14
votes
1 answer

Hibernate EHCache vs MemCache

I would like to use caching in my web application which will be scalable and distributed as well. I have used EHCache and MemCache both in small-small web application separately. Have googled and got mixed review about both, hence would like to get…
Manoj Kathiriya
  • 3,366
  • 5
  • 19
  • 19
14
votes
1 answer

guava cache vs ehcache benchmark

I'm trying to decide which of these two to use in my project: guava cache or ehcache. Looking for a lightweight service level caching solution. I've searched for some benchmarks, but couldn't find any. If you've have a benchmark handy, please post…
Raul
  • 1,899
  • 2
  • 20
  • 32
14
votes
5 answers

Simple Java caching library or design pattern?

I need to frequently access the result of a time-consuming calculation. The result changes infrequently, so I have to recalculate the data from time to time but it is ok to use the outdated result for a while. What would be the easiest way to do…
nn4l
  • 945
  • 1
  • 12
  • 28
14
votes
2 answers

Do caches in ehcache.xml inherit from defaultCache?

If I have the following configuration: What will be the value of timeToIdleSeconds for the cache test? Will it be…
Michael Piefel
  • 18,660
  • 9
  • 81
  • 112