enableCachingResults
fun enableCachingResults(refreshInterval: <Error class: unknown class> = 60.seconds, checkTimeout: <Error class: unknown class> = 30.seconds, stalenessThreshold: <Error class: unknown class>? = null)
Enable caching of health check results with background refresh
Parameters
refreshInterval
How often to refresh the cache in background (must be positive)
checkTimeout
Maximum time a single check can run before being considered failed (must be positive)
stalenessThreshold
Maximum age of cache before it's considered stale (defaults to 3x refreshInterval, must be positive if provided)
Throws
IllegalArgumentException
if any duration is not positive, or if checkTimeout >= refreshInterval