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
0
votes
1 answer

How to enable specific cache names and disable other name using Caffeine cache in Spring boot application

I am using Spring Boot for my application. Using @EnableCaching annotation at application level. Consider I have multiple cache names like below in some methods on the application @Cacheable(value = "cache1") @Cacheable(value =…
Galet
  • 5,853
  • 21
  • 82
  • 148
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

NotSerializableException when trying to add hibernate cacheable to JpaRepository method using Enum with custom @Converter

I'm trying to make my JpaReposiory method cacheable using hibernate. It is throwing exception because I'm using custom Converter on enum field I guess. My JpaRepository method where I'm using…
nciak
  • 1
0
votes
0 answers

Think CacheStoreMode.REFRESH is not working (Hibernate second level cache)

I tested the following code to study CacheStoreMode. All of the procedures below were executed in order after one procedure was completed. The method proceeded with a web controller. [Thread 1 : Register and store entities in the database and second…
kwonryul
  • 481
  • 3
  • 10
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

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

EHCache3 Statistics

I implemeted EHCache 3.10 statistics like this after looking at this post https://github.com/ehcache/ehcache3/issues/2951 StatisticsRetrieval statsRetrievalService = new StatisticsRetrieval(); try (CacheManager cacheManager =…
0
votes
1 answer

CacheEventListener is not working Ehcache

I'm trying to log events coming from ehcache and in logs I see the creation of cache, cache manager but not custom event listener: 2022-09-05 14:49:42.218 INFO 29767 --- [ restartedMain] org.ehcache.jsr107.Eh107CacheManager : Registering…
aron
  • 81
  • 3
  • 8
0
votes
1 answer

Evicting cache of a specific tenant

I have a schema-based multitenant application that uses Ehcache. Sometimes I need to evict the cache of a specific tenant/schema instead of whole application. Is there a way to achive this? Currently I use Cache#evictAllRegions and this is not what…
kamer
  • 43
  • 1
  • 7
0
votes
2 answers

Ehcache not storing anything in the file

I am trying to do a simple thing like store something in the cache and retrieve it next time if it exists. For some reason everything works fine for the first time, when called the second time, everything in the cache file is removed and the cache…
siva raman
  • 17
  • 1
  • 5
0
votes
1 answer

How to clear/ignore ehcache's data and test via MockRestServiceServer?

We are running our component test-cases in which we load some data using cache.. Now the problem is when we try other test-cases, we want to reset the cache because it then doesn't test with the other data. How can we achieve this. We are using…
thisisdude
  • 543
  • 1
  • 7
  • 31
0
votes
1 answer

Caused by: org.ehcache.core.spi.ServiceLocator$DependencyException: Multiple factories for non-plural service

We are getting below error while initializing ehcache: Caused by: org.ehcache.core.spi.ServiceLocator$DependencyException: Multiple factories for non-plural service at…
Hanish Bansal
  • 151
  • 1
  • 2
  • 8
0
votes
1 answer

How to set a Unexpirable cache in Sprint Boot EH Cache

I want to set up a cache which does not expire in a SPring Boot EH Cache application. I want to reload cache based on a application parameter. How can i implement that? I can see there is a TimeToLiveinMinutes parameter. Should i increase the value…
Sajal Saxena
  • 191
  • 1
  • 3
  • 16
1 2 3
99
100