We recently implemented this capability in one of our Octahedroid-based projects. The solution consists of a custom API endpoint that accepts a POST request containing an array of frontend paths to revalidate. The endpoint's responsibility is straightforward: iterate through the provided paths and invoke revalidatePath() function (from next/cache) for each one.
On the Drupal side, we developed a companion module that triggers requests to the revalidation endpoint when users create, update, or delete content.
This approach allows content changes to be reflected without requiring a full site rebuild, resulting in faster updates and a more efficient workflow.
Given that this requirement tends to emerge repeatedly in Drupal + Next.js architectures, I believe it would be beneficial to incorporate a standardized implementation into the project.
Additionally, could this be an opportunity to revive the Drupal revalidate initiative? The project namespace has already been reserved, but there has not been any progress so far. This feature could provide a concrete and valuable use case around which to build that effort.
I would love to hear the maintainers' thoughts on this idea and start a discussion around whether a feature like this would be a good fit for the project.
If there is alignment around the idea, I would be glad to help drive the implementation and contribute code, documentation, and testing for both the Next.js and Drupal integrations.
We recently implemented this capability in one of our Octahedroid-based projects. The solution consists of a custom API endpoint that accepts a POST request containing an array of frontend paths to revalidate. The endpoint's responsibility is straightforward: iterate through the provided paths and invoke
revalidatePath()function (fromnext/cache) for each one.On the Drupal side, we developed a companion module that triggers requests to the revalidation endpoint when users create, update, or delete content.
This approach allows content changes to be reflected without requiring a full site rebuild, resulting in faster updates and a more efficient workflow.
Given that this requirement tends to emerge repeatedly in Drupal + Next.js architectures, I believe it would be beneficial to incorporate a standardized implementation into the project.
Additionally, could this be an opportunity to revive the Drupal revalidate initiative? The project namespace has already been reserved, but there has not been any progress so far. This feature could provide a concrete and valuable use case around which to build that effort.
I would love to hear the maintainers' thoughts on this idea and start a discussion around whether a feature like this would be a good fit for the project.
If there is alignment around the idea, I would be glad to help drive the implementation and contribute code, documentation, and testing for both the Next.js and Drupal integrations.