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

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

There is a newer version: 3.0.2.GAMMA
Show 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();
    
    /** expire-time (0 represent never expire) */
    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