The request and caching strategy that is used by exchanges to retrive cached results.
Remarks
The RequestPolicy is used by cache exchanges to decide how a query operation may be resolved with cached results.h
A cache exchange may behave differently depending on which policy is returned.
cache-first (the default) prefers cached results and falls back to sending an API request.
cache-and-network returns cached results but also always sends an API request in the background.
network-only will ignore any cached results and send an API request.
cache-only will always return cached results and prevent API requests.
The request and caching strategy that is used by exchanges to retrive cached results.
Remarks
The
RequestPolicyis used by cache exchanges to decide how a query operation may be resolved with cached results.h A cache exchange may behave differently depending on which policy is returned.cache-first(the default) prefers cached results and falls back to sending an API request.cache-and-networkreturns cached results but also always sends an API request in the background.network-onlywill ignore any cached results and send an API request.cache-onlywill always return cached results and prevent API requests.