package caching
- Alphabetic
- Public
- Protected
Type Members
- abstract class Cache[Key, Value] extends AnyRef
A cache.
A cache. Used for caching values.
The strategy used for eviction is implementation-dependent.
- Key
The type of the key used to look up values.
- Value
The type of the cached value.
- abstract class ConcurrentCache[Key, Value] extends Cache[Key, Value]
A cache that is concurrency-safe.
A cache that is concurrency-safe. This means it is able to look up a value, and if it does not exist, populate the value at that key, in a single, atomic action.
- Key
The type of the key used to look up values.
- Value
The type of the cached value.
- trait EffectTunnel[F[_], G[_]] extends AnyRef
Type class for disguising the effect of
Fin the effect ofGtemporarily so thatF's effect can tunnel through an API that supports onlyG.Type class for disguising the effect of
Fin the effect ofGtemporarily so thatF's effect can tunnel through an API that supports onlyG.For example, let
Fbe com.digitalasset.canton.lifecycle.FutureUnlessShutdown, andGbe scala.concurrent.Future (see caching.EffectTunnel.effectTunnelFutureUnlessShutdown). Then we can enter the tunnelGby converting com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdowns into a dedicated exception in a failed scala.concurrent.Future and exit the tunnel again by converting the exception back into com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown. This obviously assumes that the API that supports only scala.concurrent.Future does not interact with the dedicated exception. - final class NoCache[Key, Value] extends ConcurrentCache[Key, Value]
Value Members
- object Cache
- object CaffeineCache
- object EffectTunnel
- object ScaffeineCache
- object SizedCache