Interface CacheResultPostProcessor
- All Superinterfaces:
org.springframework.core.Ordered
public interface CacheResultPostProcessor
extends org.springframework.core.Ordered
Implementations can post process results returned from the cache before they are returned from
the call to
CacheStateManager.computeIfAbsent(Supplier, CacheInfo)
or
CacheStateManager.computeIfAbsent(Function, ImperativeListCacheInfo)
. This is commonly
used to apply additional handling, like sorting.-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
-
Method Details
-
post
<P> P post(P result, boolean isImperativeProcessing) Post process the result.- Type Parameters:
P
- The result type- Parameters:
result
- The input to processisImperativeProcessing
- Whether or not this post process is the result of an imperative based cache call. SeeCacheStateManager.computeIfAbsent(Function, ImperativeListCacheInfo)
.- Returns:
- The processed result
-
getOrder
default int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-