Class SecretCache.Options
java.lang.Object
codes.grow.packages.vault.secrets.SecretCache.Options
- Enclosing class:
SecretCache
Options of
SecretCache.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretCache.Options.Builderbuilder()Starts a builder with the defaults (ttl 60 s, 1000 entries, refresh ahead at 0.8, no stale serving).intReturns the maximum number of entries.doubleReturns the refresh-ahead factor.Returns how long a stale value may be served while refreshing.ttl()Returns the time to live.
-
Method Details
-
builder
Starts a builder with the defaults (ttl 60 s, 1000 entries, refresh ahead at 0.8, no stale serving).- Returns:
- a new builder
-
ttl
Returns the time to live.- Returns:
- the ttl
-
maxEntries
public int maxEntries()Returns the maximum number of entries.- Returns:
- the limit
-
refreshAheadFactor
public double refreshAheadFactor()Returns the refresh-ahead factor.- Returns:
- factor in (0, 1]
-
staleWhileRevalidate
Returns how long a stale value may be served while refreshing.- Returns:
- the window
-