@adobe/data - v0.10.30
    Preparing search index...

    Function withCache

    • Creates a new Observe function that caches the last value, notifies every new observer immediately with it, and shares a single upstream subscription across simultaneous observers.

      By default the cache is reference-counted — see WithCacheOptions.release. Pass { release: false } to keep the upstream alive and retain the value for the observable's lifetime, replaying it synchronously to every subscriber.

      Type Parameters

      • T

      Parameters

      Returns Observe<T>