Equations
Instances For
Cache Aside pattern with a Redis backend. When a cache miss occurs, we fetch from the source callback and store it in Redis. Cache Stampete prevention with inflight request detection.
- redis : Client τ
- inflight : Std.Mutex (Std.HashMap String Inflight)
Instances For
Simple Inflight Status of a key
- hit: The value is cached
- missInflight: The value is not cached, but a request to retrieve it is pending
- miss: The value is not cached, we need to create a request to retrieve it
- hit (value : String) : CacheInflightStatus
- missInflight (consume : Inflight) : CacheInflightStatus
- miss (produce : Inflight) : CacheInflightStatus
Instances For
@[implicit_reducible]
Equations
@[implicit_reducible]
Equations
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implicit_reducible]
Equations
Cache Aside pattern with a Redis backend with stale while revalidate. When a cache stale occurs, we return the stale value and fetch from the source callback in the background. When a cache miss occurs, we fetch from the source callback and store it in Redis. Cache Stampete prevention with inflight request detection.
- redis : Client τ
- inflight : Std.Mutex (Std.HashMap String Inflight)
Instances For
Advanced Status for stale while revalidate pattern.
- hit: The value is cached and fresh
- stale: The value is cached but stale, we need to refresh it with the given promise
- staleInflight: The value is cached but stale, and a refresh is already in flight
- missInflight: The value is not cached, but a request to retrieve it is pending
- miss: The value is not cached, we need to create a request to retrieve it
- hit (value : String) : CacheSWRStatus
- staleInflight (value : String) : CacheSWRStatus
- stale (value : String) (produce : Inflight) : CacheSWRStatus
- missInflight (consume : Inflight) : CacheSWRStatus
- miss (produce : Inflight) : CacheSWRStatus