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

com.github.hetianyi.common.cache.ExpireCache Maven / Gradle / Ivy

package com.github.hetianyi.common.cache;

import java.lang.annotation.*;

/**
 * 缓存注解,会对启用该注解的方法删除相应的缓存。
 *
 * @author Jason He
 * @version 1.0.4
 * @since 1.0.4
 * @date 2020-02-01
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ExpireCache {

    /**
     * 生成缓存key的SpEL表达式。
     */
    String key() default "";

    /**
     * 是否启用缓存
     */
    boolean enable() default true;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy