#Too many requests after revalidate path
1 messages · Page 1 of 1 (latest)
Based on the information provided in the extracts, it seems like you're experiencing an issue with the revalidatePath function in Next.js. This function is used to invalidate the client-side cache and revalidate the data cache on the next page visit.
However, it's important to note that revalidatePath should be called with the page's pathname, not the URL. For example, if you're trying to revalidate a dynamic route, you should use the format /profile/[id] instead of /profile/2.
Here's an example of how to use revalidatePath:
import { revalidatePath } from 'next/cache'
revalidatePath('/profile/[id]', 'layout')
This will purge the Client-side Router Cache, and revalidate the Data Cache on the next page visit.
If you're still experiencing issues, it might be helpful to check the Next.js GitHub issues (https://github.com/vercel/next.js/issues) for similar problems or the Next.js documentation (https://nextjs.org/docs) for more information on revalidatePath and caching.
Sources:
- Next.js Documentation (https://nextjs.org/docs/app/api-reference/functions/revalidatePath#revalidating-all-data)
- GitHub Issue (https://github.com/vercel/next.js/issues/49496)
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@obtuse socket kapa.ai is still learning and improving, please let us know how it did by reacting below
no i'm not revalidatin dynamic route m reavalidation profile route from profile/id dynamic route
no i'm not revalidatin dynamic route m reavalidation profile route from profile/id dynamic route