def Slot.lookup

bend-kit-cache@0.3.0.0 · cache.bend:64

import bend-kit-cache@0.3.0.0/cache.bend as Cache
import Base

64def Slot.lookup(-V: Data, m: Maybe<&2, Entry<V>>, +now: Nat) -> Maybe<&2, Entry<V>>:
65  match m:
66    case None{}:
67      None{}
68    case Some{+e}:
69      Slot.serve(V, Nat.is_lt(now, Entry.expires(V, e)), e)

Uses (6)

Used by (1)