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
0
votes
0 answers

Spring Boot EhCache returning stale data

If service been hit after data is been expired. It is returning the old data and then refresing the data in the second hit. This is causing service to fail. @Cacheable(value = "tokenCache", cacheManager = "springTokenCacheManager") public…
Chandresh Mishra
  • 1,081
  • 3
  • 24
  • 45
0
votes
0 answers

Java in memory Caching library that support methods with element level ttl

I would like to set the expiry time of a member of an cache. I want the custom ttl when the object should expire. I know I can set it for the whole cache, e.g. Cache cache = manager.getCache("MyCache"); CacheConfiguration config =…
0
votes
0 answers

Ehcache 3.8 eviction policy in xml config

I have this xml configuration
0
votes
1 answer

Ehcache migration from net.sf.ehcache 2.10.9.2 to org.ehcache 3.10.8

I am trying to upgrade Ehcache for my Project from net.sf.ehcache 2.10.9.2 to org.ehcache 3.10.8 version. Any replacement for net.sf.ehcache.Element and CacheExceptionHandler. Less documentation on Ehcache 3, Can anyone give some tips for…
0
votes
0 answers

Ehcache 3.10.8 version class for hibernate.cache.provider_class property

We are upgrading the Ehcache version from 2.10.9.2 to ehcache 3.10.8 but we are using hybernate 3.2.3 version. Currently we are using below provider class from ehcache 2.10.9.2. I did not find the relevant provider classin 3.10.8.
0
votes
0 answers

ehcache 3 migration of net.sf.ehcache.hibernate.SingletonEhCacheProvider?

(also posted here: https://github.com/ehcache/ehcache3/issues/3129 ) I'm trying to upgrade from 2 to 3 and the (large) codebase contains: net.sf.ehcache.hibernate.SingletonEhCacheProvider inside xml-based bean containers:
Sridhar Sarnobat
  • 25,183
  • 12
  • 93
  • 106
0
votes
1 answer

SingletonEhCacheRegionFactory not available with Hibernate 6.1.7

We are using hibernate 5.2.5, where we were overriding start method of org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory todo some init actions. This class we configure in persistence.xml for key "hibernate.cache.region.factory_class" public…
Raushan
  • 307
  • 3
  • 12
0
votes
1 answer

Instantiate a CacheManager bean in Spring Boot application

I am using @Service public class Service{ @Autowired private CacheManager cacheManager; } I included org.ehcache:ehcache and spring-boot-starter-cache library in the build.gradle file. on running the application I am getting the error: Field…
juan
  • 47
  • 7
0
votes
0 answers

EhCache 3 : Too many items getting evicted from off heap store even though there is enough space off heap

I have the ehcache configuration that stores items offheap for 4G size. I do see a lot of items start to evict at around 100000 items in the cache even though cache occupied size is around 2.9G (out of 4G allocated). The constant stream of evictions…
dogfish
  • 2,646
  • 4
  • 21
  • 37
0
votes
0 answers

EHCache has too many misses on the heap tier

I am using a standalone EHcache 3.10 with heap tier, and disk tier. The heap is configured to contain 100 entries with no expirations. Actually, the algorithm insert only 30 entries into the cache, but it perform many "updates" and "reads" of these…
Guy Hudara
  • 247
  • 4
  • 13
0
votes
0 answers

Ehcache 3 CacheManager NullPointerException

I have the below config @Configuration @EnableCaching(proxyTargetClass = true) public class CachingConfig { @Bean @ConditionalOnMissingBean public javax.cache.CacheManager cacheManager() { javax.cache.spi.CachingProvider…
Aymen Kanzari
  • 1,765
  • 7
  • 41
  • 73
0
votes
0 answers

EHcache memory clarification

I am doing poc for my project . I am planning to to use EH-cache. I created a below code to check the allocated/used size of different tier java : 11 ehcache version : 3.7.0 code : public class…
Jeya Kumar
  • 1,002
  • 1
  • 13
  • 36
0
votes
0 answers

Ehcache - restore from disk upon startup

I am using Ehcache 3.10. I am using persistent cache, configured as follows: PersistentCacheManager persistentCacheManager = CacheManagerBuilder.newCacheManagerBuilder() .with(CacheManagerBuilder.persistence("\ + File.separator +…
Ahmed A
  • 3,362
  • 7
  • 39
  • 57
0
votes
0 answers

Ehcache - persisting whole cache to disk

I am using Ehcache 3.10. I have a few questions regarding persisting the cache to disk: Can I configure Ehcache to "continually" persist the cache to disk? That way when application restarts, the cache can be hydrated from disk. Is there a config…
Ahmed A
  • 3,362
  • 7
  • 39
  • 57
0
votes
0 answers

Cache replication in Ehcache 3.10.1 without xml configuration

The scenario is that in a Spring Boot application there is a ehcache 3.10.1 being used as second level cache and that is working fine. But problem occurs when application is running on multiple instances then the updates made in local cache is not…
Hammad97
  • 27
  • 7