@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) @Inherited @Documented public @interface CacheEvict
| 限定符和类型 | 可选元素和说明 |
|---|---|
boolean |
allEntries
是否删除缓存中所有数据
默认情况下是只删除关联key的缓存数据
注意:当该参数设置成
true 时 key() 参数将无效 |
boolean |
async
是否异步删除缓存中所有数据
|
CacheMode |
cacheMode
缓存模式(只使用一级缓存或者二级缓存)
|
String[] |
cacheNames
缓存名称
|
String |
key
缓存key,支持SpEL表达式
#root.method, #root.target, and #root.caches for
references to the method, target object, and
affected cache(s) respectively. |
String[] |
value
别名
cacheNames(). |
@AliasFor(value="cacheNames") public abstract String[] value
cacheNames().@AliasFor(value="value") public abstract String[] cacheNames
public abstract String key
#root.method, #root.target, and #root.caches for
references to the method, target object, and
affected cache(s) respectively.#root.methodName) and target class
(#root.targetClass) are also available.
#root.args[1], #p1 or #a1. Arguments
can also be accessed by name if that information is available.public abstract CacheMode cacheMode
public abstract boolean allEntries
默认情况下是只删除关联key的缓存数据
注意:当该参数设置成 true 时 key() 参数将无效
Copyright © 2024. All rights reserved.