Class SecretCache.Options

java.lang.Object
codes.grow.packages.awssecretsmanager.secrets.SecretCache.Options
Enclosing class:
SecretCache

public static final class SecretCache.Options extends Object
Options of SecretCache.
  • Method Details

    • builder

      public static SecretCache.Options.Builder 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

      public Duration 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

      public Duration staleWhileRevalidate()
      Returns how long a stale value may be served while refreshing.
      Returns:
      the window