AutoFetchingCache

io.chrisdavenport.mules.reload.AutoFetchingCache
See theAutoFetchingCache companion object
class AutoFetchingCache[F[_], K, V](values: Ref[F, Map[K, CacheContent[F, V]]], val defaultExpiration: Option[TimeSpec], refresh: Option[Refresh[F, K]], val fetch: K => F[V])(implicit evidence$1: Temporal[F]) extends Lookup[F, K, V]

Attributes

Companion:
object
Source:
AutoFetchingCache.scala
Graph
Supertypes
trait Lookup[F, K, V]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

Manually Cancel All Current Reloads

Manually Cancel All Current Reloads

Attributes

Source:
AutoFetchingCache.scala
def insertWithTimeout(optionTimeout: Option[TimeSpec])(k: K, v: V): F[Unit]

Insert an item in the cache, with an explicit expiration value.

Insert an item in the cache, with an explicit expiration value.

If the expiration value is None, the item will never expire. The default expiration value of the cache is ignored.

The expiration value is relative to the current clockMonotonic time, i.e. it will be automatically added to the result of clockMonotonic for the supplied unit.

Attributes

Source:
AutoFetchingCache.scala
def keys: F[List[K]]

Return all keys present in the cache, including expired items.

Return all keys present in the cache, including expired items.

Attributes

Source:
AutoFetchingCache.scala
def lookup(k: K): F[Option[V]]

Looks Up a Value in the Cache, since this cache is always populated it will always be Some.

Looks Up a Value in the Cache, since this cache is always populated it will always be Some.

Attributes

Source:
AutoFetchingCache.scala
def lookupCurrent(k: K): F[V]

This method always returns as is expected.

This method always returns as is expected.

Attributes

Source:
AutoFetchingCache.scala
def size: F[Int]

Return the size of the cache, including expired items.

Return the size of the cache, including expired items.

Attributes

Source:
AutoFetchingCache.scala

Concrete fields

val fetch: K => F[V]

Attributes

Source:
AutoFetchingCache.scala