-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
Description
Describe the feature
Give more control over caching with fetching strategies/policies:
useFetch('/api/foo', {
fetchPolicy: 'cache-first',
})
cache-first
: if present in cache, return without requesting, otherwise request then update the cache.cache-and-network
: if present in cache, return. In any case, request in the background then update the cache.network-only
: request and wait response to return, then update the cache.cache-only
: only return from cache, don't request.no-cache
: request and wait response to return, don't update the cache.standby
: same ascache-first
but don't refresh if path/parameter changes.
Additional information
- Would you be willing to help implement this feature?
- Could this feature be implemented as a module?
Final checks
- Read the contribution guide.
- Check existing discussions and issues.
EvertonWingert, hirotaka, markthree, michalzaq12, MuhammadM1998 and 7 more
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status