@Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) public @interface ReadThroughMultiCacheOption
Modifier and Type | Optional Element and Description |
---|---|
boolean |
addNullsToCache
If true and
generateKeysFromResult() is true then null value will be added to cache under keys that
don't occurred in result list. |
boolean |
generateKeysFromResult
If true then objects from result will be added to cache not by concatenating method arguments annotated by
ParameterValueKeyProvider but invoking CacheKeyMethod or toString() on each object in result
list. |
boolean |
skipNullsInResult
If true then null values from cache are not added to result list.
|
public abstract boolean generateKeysFromResult
ParameterValueKeyProvider
but invoking CacheKeyMethod
or toString() on each object in result
list. So order of the IDs on collection argument don't have to correspond the order of elements in result list.
It can increase performance increasing amount of objects added to cache if number of IDs in collection method
argument is different than number of objects in result list returned by intercepted method.
If the generateKeysFromResult()
is true it is incorrect to set addNullsToCache()
to true and
skipNullsInResult()
to false because subsequence invocations of an annotated method can return different
results.public abstract boolean addNullsToCache
generateKeysFromResult()
is true then null value will be added to cache under keys that
don't occurred in result list. If true and result from annotated method is null then null will be add to all keys
regardless of generateKeysFromResult()
value.Copyright © 2019. All rights reserved.