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…
I have a service which calls external system to retrieve some kind of objects by their external id as well as submit them back to update. Rather than retrieving objects one by one there is a more generic purpose methods:
public interface…
I intentionally have a couple of different caching providers in my classpath. I have Hazelcast for distributed cache and Caffeine for a local cache. I am trying to use JCache (JSR107) annotations for caching my values.
I have already created a…
Hazelcast is - among other things - an implementation for JCache. The JSR-107 (JCache) specification, along with a programmatic API also specifies annotations, so that caching can be done using CDI. The Hazelcast Blog even gives an example, but also…
I'm trying to add caching to a springboot application and I am running into an issue where a org.ehcache.jsr107.MultiCacheException exception is being thrown during startup.
I am using the following ( all loaded via Maven pom file):
Springboot…
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…
I have a method that has to be cached. I have a SpringBoot 2.1.7 application with a JSR-107 (JCache) cache. Cache implementation used: EHCache 3.8.0.
@Override
@HystrixCommand(fallbackMethod = "fallbackGetAllUserProfiles")
@Timed(histogram = true,…
I have a Redisson client to store a pair String, LocalDateTime. It's configured to be used through the JCache API (JSR-107).
The storage is done OK, converting with Jackson to values like 2018-01-23T11:59:34.997834 but for retrieval is not using any…
I've to implement caching with EhCache. Basic requirement is, I have to keep that cached object for fixed interval ( for now 1 hours in code below). So, I implemented the code as below:
Sample domain object:
import…
I try to integrate Ehcache 3 into a Spring Boot 2.7.7 application, but during startup, the application fails with the following error message:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name…
I have a SpringBoot (2.1.7) application with Hystrix (Javanica) and JCache (EHCache implementation). I have methods annotated with the @HystrixCommand annotation to enable Hystrix for them. I also have caching on those methods. It looks like…
I'm using Hazelcast 3.12 jCache implementation. My cache has been declared declaratively (via hazelcast-config.xml), however I want to be able to change the ExpiryPolicy's duration dynamically, as the timeout value is only available…
I'm using Hazelcast with a distributed cache in embedded mode. My cache is defined with an Eviction Policy and an Expiry Policy.
CacheSimpleConfig cacheSimpleConfig = new CacheSimpleConfig()
.setName(CACHE_NAME)
…
I have a method on which I added a cache by adding the @CacheResult annotation (I actual created a proxy because I can't change the original implementation of SomethingService):
@Service
public class SomethingServiceProxyImpl implements…
Java 8 here. Is there any way with the Caffeine caching framework (or any other JSR-107 compatible framework for that matter) to be notified when a record is evicted out of the cache?
Maybe some kind of EvictionEventListener or something?
public…