All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ideaaedi.extspringcache.annotation.Redis Maven / Gradle / Ivy

The newest version!
package com.ideaaedi.extspringcache.annotation;


import com.ideaaedi.extspringcache.enums.RedisExpireStrategyEnum;
import org.springframework.data.redis.core.RedisTemplate;

import java.time.temporal.ChronoUnit;

/**
 * redis缓存相关信息
 *
 * @author JustryDeng
 * @since 2020/11/4 14:50:29
 */
public @interface Redis {
    
    /** a spring-bean name who type of {@link RedisTemplate}. of curse, including its sub-classes. */
    String useRedisTemplate() default "redisTemplate";
    
    /** expire-time (cannot be negative or zero) */
    int expireTime() default 30;
    
    /** unit for {@link Redis#expireTime()} */
    ChronoUnit timeUnit() default ChronoUnit.SECONDS;
    
    /** strategy for {@link Redis#expireTime()} */
    RedisExpireStrategyEnum expireStrategy() default RedisExpireStrategyEnum.AUTO;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy