def add_with_lifetime
bend-collections-laws-crypto@1.0.0.0 · proofs/lib/lemmas/src/cache.bend:141
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/src/cache.bend as Cache
import Base
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/types/model.bend as T
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/src/time.bend as Time
141def add_with_lifetime(-K: Data, -V: Data, encode: K -> String, +c: Cache<K, V>, +key: K, value: V, ns: T.Int64, now: T.Int64) -> Step<K, V>:
142 +code = encode(key)
143 add_found(K, V, c, code, key, value, Time.deadline(now, ns), lookup(K, V, c, code))