AutoFetchingCache

Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

final class RefreshConfig
Companion:
object
Companion:
class

Value members

Concrete methods

def createCache[F[_] : Temporal, K, V](defaultExpiration: Option[TimeSpec], refreshConfig: Option[RefreshConfig])(fetch: K => F[V]): F[AutoFetchingCache[F, K, V]]

Create a new cache with a default expiration value for newly added cache items.

Create a new cache with a default expiration value for newly added cache items.

Items that are added to the cache without an explicit expiration value (using insert) will be inserted with the default expiration value.

If the specified default expiration value is None, items inserted by insert will never expire.