Nuxt/docs/3.api/3.utils/clear-nuxt-data.md
Sébastien Chopin 3ec108493d
docs: simplify the docs directory (#18506)
* docs: simplify docs to only markdown

* Create nuxt-config.md

* chore: update

* chore: add readme
2023-01-25 10:41:41 +01:00

459 B

clearNuxtData

Delete cached data, error status and pending promises of useAsyncData and useFetch.

This method is useful if you want to invalidate the data fetching for another page.

Type

clearNuxtData (keys?: string | string[] | ((key: string) => boolean)): void

Parameters

  • keys: On or an array of keys that are used in useAsyncData to delete their cached data. If no keys are provided, every data will be invalidated.