API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
typeCacheReadResult
The outcome of reading one cache record. A miss and a failure are deliberately different things: a miss resolves to `{ hit: false }`, a store that could not answer rejects. Reporting both as one absent value would make "this entry was never written" indistinguishable from "the database is broken", which is exactly the distinction a cache-only policy has to act on. The `hit` discriminant is what carries the value, so a stored `null` or `undefined` is still a hit.
import { CacheReadResult } from '@codexo/exojs'The outcome of reading one cache record.
A miss and a failure are deliberately different things: a miss resolves to `{ hit: false }`, a store that could not answer rejects. Reporting both as one absent value would make "this entry was never written" indistinguishable from "the database is broken", which is exactly the distinction a cache-only policy has to act on.
The `hit` discriminant is what carries the value, so a stored `null` or `undefined` is still a hit.
{ hit: false } | { hit: true; value: T }