@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) @Inherited @Documented public @interface CachePut
| 限定符和类型 | 可选元素和说明 |
|---|---|
CacheMode |
cacheMode
缓存模式(只使用一级缓存或者二级缓存)
|
String[] |
cacheNames
缓存名称
|
String |
depict
描述
|
FirstCache |
firstCache
一级缓存配置
|
String |
key
缓存key,支持SpEL表达式
The SpEL expression evaluates against a dedicated context that provides the
following meta-data:
#result for a reference to the result of the method invocation. |
SecondaryCache |
secondaryCache
二级缓存配置
|
String[] |
value
别名
cacheNames(). |
@AliasFor(value="cacheNames") public abstract String[] value
cacheNames().@AliasFor(value="value") public abstract String[] cacheNames
public abstract String depict
public abstract String key
The SpEL expression evaluates against a dedicated context that provides the following meta-data:
#result for a reference to the result of the method invocation. For
supported wrappers such as Optional, #result refers to the actual
object, not the wrapper#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 FirstCache firstCache
public abstract SecondaryCache secondaryCache
Copyright © 2024. All rights reserved.