Questions tagged [ehcache-3]

For questions specific to Ehcache version 3. For general question about Ehcache, use the [ehcache] tag

Ehcache version 3 is the latest version of Ehcache. For more information about Ehcache, see the main Ehcache wiki.

Site: http://www.ehcache.org/

Github: https://github.com/ehcache/ehcache3

172 questions
3
votes
1 answer

Does ehcache 3.8.1 still use ehcache.xml for configuration?

Does ehcache 3.8.1 no longer automatically pick up the configuration settings in an ehcache.xml file at the source root directory?
Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
3
votes
2 answers

How to set maxDepthExceededBehavior in ehcache3 in springboot with programmed configuration?

I want to avoid Max Object Graph Size reached for the object : 840 - error . As per this This element has the following attributes maxDepth – Controls how many linked objects can be visited before the size-of engine takes any action. This…
user2758406
  • 536
  • 7
  • 16
3
votes
2 answers

How do I get a list of cache names in Ehcache 3

In Ehcache 2 I used Cache releaseCache = cacheManager.getCacheNames(); But in Ehcache 3 although I have a CacheManager the getCacheNames() method does not exist.
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
3
votes
2 answers

How to specify relative path for hibernate.javax.cache.uri property in xml based spring configuration

I have legacy spring application which is built using xml based configuration I am trying to configure session factory with second level cache. I have ecache.xml file present in resource folder also hibernate.javax.cache.uri property expects…
3
votes
0 answers

How to get the timestamp value of an entry when it is added to cache in ehcache3?

while migrating from ehcache 2.10to 3.5.2, can not find replacement for "net.sf.ehcache.Element" in ehcache 3.5.2 version. Following is the code in ehacache2 version : Element pageCacheElement = basicCache.getQuiet(filepath); long pageTime =…
Madhuri Haritha
  • 357
  • 1
  • 4
  • 13
3
votes
2 answers

java.lang.annotation.IncompleteAnnotationException: org.terracotta.statistics.Statistic missing element type

My project have hibernate l2 cache and using ehcache for manage that with this configuration hibernate.cache.region.factory_class: org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory After migrate to Spring boot 2 I get this exception Caused…
ali akbar azizkhani
  • 2,213
  • 5
  • 31
  • 48
3
votes
1 answer

EhCache 3 and Spring Boot

Is there a way to abstract the EhCache 3 CacheManager (org.ehcache.CacheManager) to Spring's CacheManager (org.springframework.cache.CacheManager)? With EhCache2, it is possible, by the following: @Bean public…
Christina
  • 361
  • 1
  • 5
  • 17
3
votes
1 answer

Disk persistent cache in ehcache 3.4 is using (leaking?) direct memory

I am running a web application that makes use of Ehcache 3.4.0. I have a cache configuration that defines a simple default of 1000 in-memory objects: java.lang.Object
Daniel
  • 3,312
  • 1
  • 14
  • 31
3
votes
1 answer

Disable / Switch off Ehcache3

Anybody knows how to switch off ehcache 3 in an application? (e.g. for testing purposes or fall back scenarios in production) For ehcache 2 this was possible with: net.sf.ehcache.disabled=true as described here How to disable all caches in ehcache3…
timguy
  • 2,063
  • 2
  • 21
  • 40
3
votes
4 answers

How to access Apache camel eh-cache outside camel context?

I want to consume data from web service and put it in camel eh-cache. later i want to use this cache outside camel context through CacheManager. I am not finding any way to do it. In below code I have skipped consumption of web service and used data…
Murli
  • 1,258
  • 9
  • 20
2
votes
1 answer

Ehcache is registering beans two times

I don't know if it is a normal behavior or not, but when I start the Spring server I check that the cache works correctly, at this point Ehcache informs me when it has correctly registered a model: 2020-11-06 21: 38: 23.253 INFO 32643 --- [main]…
user7332139
2
votes
0 answers

Is it possible to implement a cache refresh behaviour using Ehcache 3.x?

Can EhCache 3.x caches be configured to implement a refresh operation (see https://github.com/google/guava/wiki/CachesExplained#refresh for an example as implemented using Guava) - i.e. if the entry is expired, return the expired entry until the…
Chris Cooper
  • 869
  • 2
  • 18
  • 42
2
votes
1 answer

How to create multiple cache key in @Cacheable when parameter value is null

I am trying to create a cache key with multiple parameter values. @Cacheable(cacheNames = "cache_name_", key = "#name + '_' + #id") private JSONObject getData(String name, String id) throws Exception { From the above scenario, I name is a mandatory…
r123
  • 578
  • 8
  • 26
2
votes
1 answer

EhCache3 + Spring Boot 2 without XML

I'm stuck finding solution how to implement EhCache3 with Spring Boot 2. The problem is that in version 3 they changed package to org.ehcache and examples of xml-less configuration I found are for 2 version where you declare net.sf.ehcache.config.…
Bohdan Myslyvchuk
  • 1,657
  • 3
  • 24
  • 39
2
votes
1 answer

EHCache - org.ehcache.StateTransitionException: Persistence directory already locked by another process

I am running a struts2 application am I have to implement a cache to cache certain responses. I have used EHCache and created a helper class to initialize and configure the cache as follows: import java.io.File; import org.ehcache.Cache; import…
Desmond27
  • 173
  • 1
  • 4
  • 17
1 2
3
11 12