Cached

zio.Cached$
See theCached companion trait
object Cached

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Cached.type

Members list

Concise view

Value members

Concrete methods

def auto[R, Error, Resource](acquire: ZIO[R, Error, Resource], policy: Schedule[Any, Any, Any])(implicit trace: Trace): ZIO[R & Scope, Nothing, Cached[Error, Resource]]

Creates a new Cached value that is automatically refreshed according to the specified policy. Note that error retrying is not performed automatically, so if you want to retry on errors, you should first apply retry policies to the acquisition effect before passing it to this constructor.

Creates a new Cached value that is automatically refreshed according to the specified policy. Note that error retrying is not performed automatically, so if you want to retry on errors, you should first apply retry policies to the acquisition effect before passing it to this constructor.

Attributes

def manual[R, Error, Resource](acquire: ZIO[R, Error, Resource])(implicit trace: Trace): ZIO[R & Scope, Nothing, Cached[Error, Resource]]

Creates a new Cached value that must be manually refreshed by calling the refresh method. Note that error retrying is not performed automatically, so if you want to retry on errors, you should first apply retry policies to the acquisition effect before passing it to this constructor.

Creates a new Cached value that must be manually refreshed by calling the refresh method. Note that error retrying is not performed automatically, so if you want to retry on errors, you should first apply retry policies to the acquisition effect before passing it to this constructor.

Attributes