LayeredCache
A two-tier cache composing a fast memory layer over an optional persistent layer.
Mirrors SwiftyNetwork's LayeredCache: reads consult memory first, fall back to the persistent layer, and promote a persistent hit back into memory — preserving the original timestamp when the memory layer is a TimestampedCache. Writes go through to both layers.
changes reflects writes and removals against this layered view; read-time promotions are not reported, since the logical value did not change.
Parameters
the fast, volatile layer.
the durable layer, or null for a memory-only cache.
Functions
A hot stream of CacheChanges for this cache. The default is an empty flow, so caches that cannot observe mutations are simply non-reactive; observable caches override this.
Removes any value stored for key.