We can also manually hit the revalidate endpoint with a POST request and receive a response indicating the content has been refreshed:
{
"revalidated": true,
"now": 1733861815300
}
However, the site is not updated with modified content. Perhaps I'm misunderstanding, but it looks like the content should refresh nearly immediately when a publish is made. Is there something we are missing?
Thanks for any assistance!
Hosting provider
AWS - the site is running in two load-balanced ECS tasks, and is using a a Valkey (Redis) cache with a custom cache handler.
Thank you for providing detailed information about your setup. Based on your description, it seems like the /revalidate endpoint is functioning correctly, as it returns a response indicating successful revalidation. However, the updated content is not appearing on your site. Here are a few potential areas to investigate:
Custom Cache Handler: Since you're using a custom cache handler with Redis, ensure that the cache is being cleared or updated properly when the /revalidate endpoint is triggered. If the cache is still serving old content, the updated content won't appear on your site. Verify that the cache handler is integrated with the revalidation process.
Next.js Cache: If you're using Next.js's caching features, ensure that the revalidateTag or revalidatePath functions are being used correctly to clear the cache for the specific content or route.
2.1. Refer to the Next.js caching documentation: App Router: Building Your Application | Next.js for more details.
2.2 Some of our Next cache troubleshooting might help: Troubleshooting: Caching with Next.js & Vercel
Load-Balanced ECS Tasks: Since your site is running on two load-balanced ECS tasks, ensure that the revalidation process is synchronized across both tasks. If one task updates its cache but the other does not, you might see inconsistent content updates.
Prismic Webhook Configuration: Double-check your Prismic webhook settings to ensure that the correct triggers (e.g., "A document is published" and "A document is unpublished") are selected and that the webhook is pointing to the correct /revalidate endpoint.
API Data Fetching: Ensure that your application is fetching the latest data from Prismic after revalidation. If the API client is caching the master ref or API object, it might not be retrieving the updated content. Refer to the [Fetch Data in Next.js documentation|Fetch Data in Next.js - Documentation - Prismic] for best practices.
If you've verified these areas and the issue persists, it might be helpful to log the revalidation process and cache updates to identify where the breakdown is occurring. Let me know if you need further clarification or assistance!