Class CachingOperationInvoker
java.lang.Object
org.springframework.boot.actuate.endpoint.invoker.cache.CachingOperationInvoker
- All Implemented Interfaces:
OperationInvoker
An
OperationInvoker that caches the response of an operation with a
configurable time to live.- Since:
- 2.0.0
- Author:
- Stephane Nicoll, Christoph Dreis, Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptionlongReturn the maximum time in milliseconds that a response can be cached.invoke(InvocationContext context) Invoke the underlying operation using the givencontext.
-
Method Details
-
getTimeToLive
public long getTimeToLive()Return the maximum time in milliseconds that a response can be cached.- Returns:
- the time to live of a response
-
invoke
Description copied from interface:OperationInvokerInvoke the underlying operation using the givencontext.- Specified by:
invokein interfaceOperationInvoker- Parameters:
context- the context to use to invoke the operation- Returns:
- the result of the operation, may be
null
-