Core - v1.0.0
    Preparing search index...

    Class NoopCacheStore<TRuntime>

    A cache that stores nothing.

    Every read misses, every write is dropped, and NoopCacheStore.remember still returns the computed value — which is exactly the behaviour CacheStore requires of an unavailable cache. That makes this a substitutable stand-in rather than a stub: code written against the interface cannot tell it apart from a real cache that keeps missing, because there is no observable difference to find.

    Use it to run deliberately without a cache, or as the test double that proves a caller does not secretly depend on a hit.

    Bayu Dwiyan Satria

    1.0.0

    1.0.0

    Type Parameters

    • TRuntime = unknown

      The runtime handle, ignored throughout.

    Implements

    Index
    • Computes the value and returns it uncached.

      Type Parameters

      • T

      Parameters

      • runtime: TRuntime

        The runtime handle, ignored.

      • key: string

        The cache key, ignored.

      • load: () => Promise<T>

        Computes the value.

      Returns Promise<T>

      The computed value.