Cached

zio.Cached
See theCached companion object
trait Cached[+Error, +Resource]

A Cached is a possibly resourceful value that is loaded into memory, and which can be refreshed either manually or automatically.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def get(implicit trace: Trace): IO[Error, Resource]

Retrieves the current value stored in the cache.

Retrieves the current value stored in the cache.

Attributes

def refresh(implicit trace: Trace): IO[Error, Unit]

Refreshes the cache. This method will not return until either the refresh is successful, or the refresh operation fails.

Refreshes the cache. This method will not return until either the refresh is successful, or the refresh operation fails.

Attributes