revalidate
Edit this pageRevalidate will receive the either a cache key or an array of cache keys and invalidate those queries.
tip:
If you intend to re-fire the queries immediately, check the reload helper.
The code below will revalidate the getTodo
query with the cache key.
To better understand how queries work, check the query documentation.
Force Revalidation
The revalidate
function also accepts a second parameter to force the revalidation of the cache data.