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

com.feingto.cloud.config.redis.RedisCachePut Maven / Gradle / Ivy

The newest version!
package com.feingto.cloud.config.redis;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

/**
 * 针对方法配置,能够根据方法的请求参数对其结果进行缓存,和 @RedisCacheable 不同的是,它每次都会触发真实方法的调用
 *
 * @author longfei
 */
@Documented
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface RedisCachePut {
    String cacheName() default "";

    /**
     * 缓存Key,支持EL表达式
     */
    String key() default "";

    /**
     * 过期时间
     */
    long expire() default 0;

    /**
     * 时间单位
     */
    TimeUnit timeUnit() default TimeUnit.SECONDS;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy