Cached

object Cached
Companion:
class
class Object
trait Matchable
class Any
Cached.type

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.

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.