110 Star 788 Fork 246

GVPqiujiayu / AutoLoadCache

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
LocalCache.java 836 Bytes
一键复制 编辑 原始数据 按行查看 历史
qiujiayu 提交于 2020-03-09 23:33 . remove @author 
package com.jarvis.cache.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 本地缓存注解
*
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Inherited
@Documented
public @interface LocalCache {
/**
* 缓存的过期时间,单位:秒,如果为0则表示永久缓存
*
* @return 时间
*/
int expire();
/**
* 动态获取缓存过期时间的表达式
*
* @return 时间表达式
*/
String expireExpression() default "";
/**
* 只缓存在本地
*
* @return boolean
*/
boolean localOnly() default false;
}
Java
1
https://gitee.com/qiujiayu/AutoLoadCache.git
git@gitee.com:qiujiayu/AutoLoadCache.git
qiujiayu
AutoLoadCache
AutoLoadCache
master

搜索帮助