Related:
One approach would be to have another async function that runs before the queryFn (and maybe one that runs after it ?) that would skip calling the queryFn if something other than undefined was returned. Here, people could read from an async storage (and potentially write to it in the "after" hook). The query could also stay in fetchStatus: 'idle' because we haven't triggered the queryFn yet.
Combined with the possibility to customize the in-memory cache (see #4687), people would be free to keep the size of the in-memory cache small.
Related:
One approach would be to have another async function that runs before the
queryFn(and maybe one that runs after it ?) that would skip calling thequeryFnif something other thanundefinedwas returned. Here, people could read from an async storage (and potentially write to it in the "after" hook). The query could also stay infetchStatus: 'idle'because we haven't triggered thequeryFnyet.Combined with the possibility to customize the in-memory cache (see #4687), people would be free to keep the size of the in-memory cache small.