API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

T

typeCacheReadResult

@codexo/exojs / assets / stable

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.

0
props
0
methods
0
events
Import
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.

Definition1
{ hit: false } | { hit: true; value: T }
Source