CacheFetchPolicy
Specifies behavior for a caching API.
Entries
Link copied to clipboard
Content copied to clipboard
(default) returns the cached data if available (even if stale). If not available, fetches up-to-date data. If cached data is stale, it initiates a fetch in the background.
Link copied to clipboard
Content copied to clipboard
Returns the cached data if available and not stale. If not available or stale, it fetches up-to-date data. Note that this won't return stale data even if fetch request fails
Link copied to clipboard
Content copied to clipboard
Ignore whether the cache has a value or not and fetch the most up-to-date data. This will return an error if the fetch request fails
Link copied to clipboard
Content copied to clipboard
Returns values from the cache, or throws an error if not available. It won't initiate a fetch.