Kick off a fetch for key when it has never resolved and is not already
in flight. This is the idempotent entry point hooks call from an effect;
StrictMode's double-invoke therefore does not double-fetch.
With options.staleTimeMs, a resolved entry whose data is at least that
old is additionally revalidated in the background (stale-while-revalidate:
the cached data stays served while isFetching is true). 0 revalidates
on every ensure; omitted keeps the historical never-revalidate behavior.
OptionalstaleExperimentalThe promise of the in-flight run for key, or undefined when no fetch
is running. Suspense-mode hooks throw this promise while the first load is
pending; it never rejects (errors land on the snapshot instead).
Read the current snapshot for key; a stable idle snapshot if unseen.
Force a (re)fetch for key, superseding any in-flight request. The last
resolved data is preserved while the refetch runs.
Subscribe listener to changes for key. When the final listener for a
key unsubscribes and a fetch is still in flight, the fetch is aborted so
unmounting the last consumer cancels the underlying request.
Per-
HonuaProvidercache of query results. Not a React construct; it is driven by the hooks via subscribe / getSnapshot / ensure.