mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
docs: add cache option to useFetch params (#27225)
This commit is contained in:
parent
06be4cc025
commit
855292f363
@ -87,6 +87,8 @@ Watch the video from Alexander Lichter to avoid using `useFetch` the wrong way!
|
||||
- `headers`: Request headers.
|
||||
- `baseURL`: Base URL for the request.
|
||||
- `timeout`: Milliseconds to automatically abort request
|
||||
- `cache`: Handles cache control according to [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/fetch#cache)
|
||||
- You can pass boolean to disable the cache or you can pass one of the following values: `default`, `no-store`, `reload`, `no-cache`, `force-cache`, and `only-if-cached`.
|
||||
|
||||
::note
|
||||
All fetch options can be given a `computed` or `ref` value. These will be watched and new requests made automatically with any new values if they are updated.
|
||||
|
Loading…
Reference in New Issue
Block a user