Cached

zio.Cached
See theCached companion object
sealed 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
Source
Cached.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

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

Source
Cached.scala
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

Source
Cached.scala