Package io.github.suppie.spring.cache
Class MultiLevelCacheManager
java.lang.Object
io.github.suppie.spring.cache.MultiLevelCacheManager
- All Implemented Interfaces:
org.springframework.cache.CacheManager
public class MultiLevelCacheManager
extends Object
implements org.springframework.cache.CacheManager
Cache manager to cover basic operations
-
Constructor Summary
ConstructorsConstructorDescriptionMultiLevelCacheManager(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.cache.CacheProperties> highLevelProperties, MultiLevelCacheConfigurationProperties properties, org.springframework.data.redis.core.RedisTemplate<Object, Object> redisTemplate, io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cache.CacheGet or create the cache associated with the given name.@NonNull Collection<String>Get a collection of the cache names known by this manager.
-
Constructor Details
-
MultiLevelCacheManager
public MultiLevelCacheManager(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.cache.CacheProperties> highLevelProperties, MultiLevelCacheConfigurationProperties properties, org.springframework.data.redis.core.RedisTemplate<Object, Object> redisTemplate, io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)
-
-
Method Details
-
getCache
Get or create the cache associated with the given name.- Specified by:
getCachein interfaceorg.springframework.cache.CacheManager- Parameters:
name- the cache identifier (must not benull)- Returns:
- the associated cache, or
nullif such a cache does not exist or could be not created
-
getCacheNames
Get a collection of the cache names known by this manager.- Specified by:
getCacheNamesin interfaceorg.springframework.cache.CacheManager- Returns:
- the names of all caches known by the cache manager
-