abstract class ScopedCache[-Key, +Error, +Value] extends AnyRef
- Alphabetic
- By Inheritance
- ScopedCache
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ScopedCache()
Abstract Value Members
-
abstract
def
cacheStats: UIO[CacheStats]
Returns statistics for this cache.
-
abstract
def
contains(key: Key): UIO[Boolean]
Return whether a resource associated with the specified key exists in the cache.
Return whether a resource associated with the specified key exists in the cache. Sometime
containscan return true if the resource is currently being created but not yet totally created -
abstract
def
entryStats(key: Key): UIO[Option[EntryStats]]
Return statistics for the specified entry.
-
abstract
def
get(key: Key): ZIO[Scope, Error, Value]
Gets the value from the cache if it exists or otherwise computes it, the release action signals to the cache that the value is no longer being used and can potentially be finalized subject to the policies of the cache
-
abstract
def
invalidate(key: Key): UIO[Unit]
Invalidates the resource associated with the specified key.
-
abstract
def
invalidateAll: UIO[Unit]
Invalidates all values in the cache.
-
abstract
def
refresh(key: Key): IO[Error, Unit]
Force the reuse of the lookup function to compute the returned scoped effect associated with the specified key immediately Once the new resource is recomputed, the old resource associated to the key is cleaned (once all fiber using it are done with it) During the time the new resource is computed, concurrent call the .get will use the old resource if this one is not expired
-
abstract
def
size: UIO[Int]
Returns the approximate number of values in the cache.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()