@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface Cached
| Modifier and Type | Optional Element and Description |
|---|---|
String |
area
If you want to use multi backend cache system, you can setup multi "cache area" in configuration,
this attribute specifies the name of the "cache area" you want to use.
|
boolean |
cacheNullValue
Specify whether a null value should be cached.
|
CacheType |
cacheType
Type of the Cache instance.
|
String |
condition
Expression script used for conditioning the method caching, the cache is not
used when evaluation result is false.
|
boolean |
enabled
Specify whether the method caching is enabled.
|
int |
expire
The expire time.
|
String |
key
Specify the key by expression script, optional.
|
String |
keyConvertor
Specify the key convertor.
|
int |
localExpire
Use to specify the local cache expire time when cacheType=CacheType.BOTH, use "expire" if absent.
|
int |
localLimit
Specify max elements in local memory when cacheType is CacheType.LOCAL or CacheType.BOTH.
|
String |
name
The name of this Cache instance, optional.
|
String |
postCondition
Expression script used for conditioning the method cache updating,
the cache updating action is vetoed when the evaluation result is false.
|
String |
serialPolicy
Specify the serialization policy of remote cache when cacheType is CacheType.REMOTE or CacheType.BOTH.
|
TimeUnit |
timeUnit
Specify the time unit of expire.
|
public abstract String area
public abstract String name
public abstract boolean enabled
CacheContext.enableCache(Supplier<T> callback)public abstract TimeUnit timeUnit
public abstract int expire
public abstract int localExpire
public abstract CacheType cacheType
public abstract int localLimit
public abstract String serialPolicy
public abstract String keyConvertor
public abstract String key
public abstract boolean cacheNullValue
public abstract String condition
public abstract String postCondition
Copyright © 2013–2022. All rights reserved.