Build a generic mechanism allowing to fetch and cache a given value.
Describes what to fetch and how to cache it, see PollingCachedValueOptions.
Gets the cached value if any.
Call this as early as possible and when the value can already be fetched.
OptionalttlMillis: number
The time-to-live before the value gets refreshed, overriding the one given at construction. If omitted the configured default is kept.
Call when the client is stopped, or when the cached value is no longer needed.
Defines a generic mechanism to fetch and cache a value, refreshing it periodically.