Package com.bytedesk.core.redis.cache
Class RedisCacheConfig
java.lang.Object
com.bytedesk.core.redis.cache.RedisCacheConfig
- All Implemented Interfaces:
org.springframework.cache.annotation.CachingConfigurer
@Configuration
public class RedisCacheConfig
extends Object
implements org.springframework.cache.annotation.CachingConfigurer
cache config
https://docs.spring.io/spring-boot/reference/io/caching.html
https://docs.spring.io/spring-data/redis/reference/redis/redis-cache.html
https://docs.spring.io/spring-framework/reference/integration/cache/annotations.html#cache-spel-context
https://docs.spring.io/spring-boot/docs/3.2.0/reference/htmlsingle/#io.caching
https://www.51cto.com/article/753777.html
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cache.interceptor.CacheErrorHandler
org.springframework.data.redis.cache.RedisCacheManager
redisCacheManager
(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.cache.annotation.CachingConfigurer
cacheManager, cacheResolver, keyGenerator
-
Constructor Details
-
RedisCacheConfig
public RedisCacheConfig()
-
-
Method Details
-
redisCacheManager
@Bean @ConditionalOnProperty(name="spring.cache.type", havingValue="redis") public org.springframework.data.redis.cache.RedisCacheManager redisCacheManager(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory) -
errorHandler
public org.springframework.cache.interceptor.CacheErrorHandler errorHandler()- Specified by:
errorHandler
in interfaceorg.springframework.cache.annotation.CachingConfigurer
-