const ProductKey = Data.struct<{ kind: "product"; id: string }>({ kind: "product", id: "" })
const cache = yield* Cache.make({
capacity: 100,
timeToLive: Duration.days(10),
lookup: (key: typeof ProductKey) => getProduct(key.id),
})
const ProductKey = Data.struct<{ kind: "product"; id: string }>({ kind: "product", id: "" })
const cache = yield* Cache.make({
capacity: 100,
timeToLive: Duration.days(10),
lookup: (key: typeof ProductKey) => getProduct(key.id),
})