def cache.fresh.go

emerging-ezhttp@0.21.0.0 · src/cache.bend:145

import emerging-ezhttp@0.21.0.0/src/cache.bend as Cache
import Base

145# freshness from max-age. no-store and no-cache are not fresh.
146def cache.fresh.go(age: Nat, m: Maybe<&2, Nat>) -> Bool:
147  match m:
148    case None{}:
149      False{}
150    case Some{n}:
151      Nat.is_lt(age, n)

Uses (4)

Used by (1)