Add Revalidate Option to Preview Site Config Entity

Created on 1 August 2022, over 2 years ago
Updated 25 October 2023, about 1 year ago

Problem/Motivation

As a site builder using decoupled preview, I want to be able to specify content types that should be revalidated in order to ensure that they will always display the latest content on the front end site.

Proposed resolution

* If a preview site config entity uses a type of ‘next.js’ additional ‘Revalidate Paths’ checkbox is available on the form.
* This checkbox has the following description text: 'Enable this option to purge the Next.js cache for related paths Drupal content is updated'
* If a preview site config entity uses a type of ‘next.js’ additional ‘Revalidate tags’ checkbox is available on the form.
* This checkbox has the following description text: 'Enable this option to purge the Next.js cache for related cache tags when Drupal content is updated'
* If Revalidate Paths is checked, a ‘Path Revalidation API Route’ textbox becomes visible.
* If Revalidate Paths is checked, the ‘Path Revalidation API Route’ textbox is required.
* If Revalidate Tags is checked, a ‘Tag Revalidation API Route’ textbox becomes visible.
* If Revalidate Tags is checked, the ‘TagRevalidation API Route’ textbox is required.

Remaining tasks

* Update preview site config entity
* Update preview site config form.

User interface changes

* Revalidate Paths option and Revalidation API Route added to preview site config entity form.
* Revalidate Tags option and Revalidation API Route added to preview site config entity form.

Data model changes

* Revalidate Paths option and Revalidation API Route added to preview site config entity.
* Revalidate Tags option and Revalidation API Route added to preview site config entity.

Other info:

More information on Next.js On-Demand Revalidation: https://nextjs.org/docs/basic-features/data-fetching/incremental-static-...

App Router Version: https://nextjs.org/docs/app/building-your-application/data-fetching/fetc...

Feature request
Status

Postponed

Version

1.0

Component

Code

Created by

🇺🇸United States brianperry

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States brianperry

    Updated issue summary based on recent feature enhancements in Next.js.

    Marking as postponed - Next is kind of in an awkward place during the transition between the pages router and the app router. Would be easier to implement this if we didn't have to account for multiple APIs.

    In the meantime, would be happy to re-open this if there is demand.

Production build 0.71.5 2024