Class HerodotusRedisCacheManager

java.lang.Object
org.springframework.cache.support.AbstractCacheManager
org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager
org.springframework.data.redis.cache.RedisCacheManager
cn.herodotus.engine.cache.redis.enhance.HerodotusRedisCacheManager
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.cache.CacheManager

public class HerodotusRedisCacheManager extends org.springframework.data.redis.cache.RedisCacheManager

Description: 扩展的RedisCacheManager

用于支持 Redis 缓存可以针对实体进行单独的过期时间设定

Author:
: gengwei.zheng
Date:
: 2021/10/25 20:49
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.data.redis.cache.RedisCacheManager

    org.springframework.data.redis.cache.RedisCacheManager.RedisCacheManagerBuilder
  • Field Summary

    Fields inherited from class org.springframework.data.redis.cache.RedisCacheManager

    DEFAULT_ALLOW_RUNTIME_CACHE_CREATION
  • Constructor Summary

    Constructors
    Constructor
    Description
    HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, boolean allowInFlightCacheCreation, CacheProperties cacheProperties, String... initialCacheNames)
     
    HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, CacheProperties cacheProperties)
     
    HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, CacheProperties cacheProperties, String... initialCacheNames)
     
    HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> initialCacheConfigurations, boolean allowInFlightCacheCreation)
     
    HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> initialCacheConfigurations, CacheProperties cacheProperties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.data.redis.cache.RedisCache
    createRedisCache(String name, org.springframework.data.redis.cache.RedisCacheConfiguration cacheConfig)
     

    Methods inherited from class org.springframework.data.redis.cache.RedisCacheManager

    builder, builder, builder, create, getCacheConfigurations, getCacheWriter, getDefaultCacheConfiguration, getInitialCacheConfiguration, getMissingCache, isAllowRuntimeCacheCreation, loadCaches

    Methods inherited from class org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager

    decorateCache, isTransactionAware, setTransactionAware

    Methods inherited from class org.springframework.cache.support.AbstractCacheManager

    afterPropertiesSet, getCache, getCacheNames, initializeCaches, lookupCache

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HerodotusRedisCacheManager

      public HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, CacheProperties cacheProperties)
    • HerodotusRedisCacheManager

      public HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, CacheProperties cacheProperties, String... initialCacheNames)
    • HerodotusRedisCacheManager

      public HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, boolean allowInFlightCacheCreation, CacheProperties cacheProperties, String... initialCacheNames)
    • HerodotusRedisCacheManager

      public HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> initialCacheConfigurations, CacheProperties cacheProperties)
    • HerodotusRedisCacheManager

      public HerodotusRedisCacheManager(org.springframework.data.redis.cache.RedisCacheWriter cacheWriter, org.springframework.data.redis.cache.RedisCacheConfiguration defaultCacheConfiguration, Map<String,org.springframework.data.redis.cache.RedisCacheConfiguration> initialCacheConfigurations, boolean allowInFlightCacheCreation)
  • Method Details

    • createRedisCache

      protected org.springframework.data.redis.cache.RedisCache createRedisCache(String name, org.springframework.data.redis.cache.RedisCacheConfiguration cacheConfig)
      Overrides:
      createRedisCache in class org.springframework.data.redis.cache.RedisCacheManager