@Inherited @Retention(value=RUNTIME) @Target(value=METHOD) public @interface Cacheable
| 限定符和类型 | 可选元素和说明 |
|---|---|
String |
key
缓存的key
|
int |
liveSeconds
缓存时间,单位秒
默认情况下,缓存永久有效
|
boolean |
nullCacheEnable
是否对 null 值进行缓存
|
boolean |
returnCopyEnable
是否对返回的数据进行 Copy 后返回
|
String |
unless
在什么情况下不进行缓存
这里编写的是 JFinal 模板引擎的表达式
|
public abstract int liveSeconds
public abstract boolean nullCacheEnable
public abstract boolean returnCopyEnable
Copyright © 2024. All rights reserved.