Table of Contents

Interface IQueryCacheInspector

Namespace
DotNetQuery.Core.Inspection
Assembly
DotNetQuery.Core.dll

Read access to the live contents of a query client's cache, for building developer tools such as a cache inspector. Obtain one with TryGetInspector(IQueryClient, out IQueryCacheInspector?).

public interface IQueryCacheInspector

Properties

Entries

Emits the cache's entries — the current list immediately on subscribe, then a fresh list whenever an entry is added, evicted, has a pending eviction cancelled, or changes state.

IObservable<IReadOnlyList<IQueryCacheEntry>> Entries { get; }

Property Value

IObservable<IReadOnlyList<IQueryCacheEntry>>

Remarks

Each emitted list is a snapshot of which entries are in the cache; the entries themselves are live views (see IQueryCacheEntry). Emissions are not coalesced, so a fetch produces several in quick succession. The sequence completes when the client is disposed.

Threading: emissions arrive on whichever thread changed the cache — typically a thread-pool thread finishing a fetch, or the scheduler's timer thread for evictions. UI consumers must marshal onto the UI thread before touching UI state: in Blazor, InvokeAsync; with DotNetQuery.Mvvm, ObserveOnUi().