Skip to main content
Version: Next

revalidate

revalidate(tag, args): Promise<T>

Forces a refresh of cached data by its tag (on-demand revalidation)

const freshData = await revalidate('user:123');
ParameterTypeOptionalDescription
tagstringThe cache tag to revalidate
argsArray<any>Arguments to pass to the cached function