Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Next.js Tag Revalidator

8 sites No security coverage Drupal 10–11 Next ecosystem
View on drupal.org

This project provides precise cache revalidation for Next.js applications using Drupal as a headless CMS. It allows you to specify which cache tags to refresh when content changes in Drupal, giving you granular control and optimizing performance for your Next.js frontend.

Deprecated

The changes in this projects have been ported over the latest drupal next module

Provides, configurable cache tag-based revalidation for Next.js applications using Drupal as a headless CMS. When content changes in Drupal, this module automatically tells your Next.js app which specific pages to refresh, giving you precise control over cache invalidation.

Features

Basic Functionality: This module integrates with the Next.js module to provide intelligent cache invalidation. When content is created, updated, or deleted in Drupal, it automatically tells your Next.js application to refresh specific pages based on cache tags.

Unique Features:

  • Granular Control: Choose exactly which cache tags to revalidate (individual entities, content type lists, or custom tags)
  • Bundle-Specific Tags: Generates proper cache tags like node_list:article and taxonomy_list:categories that Next.js applications need
  • Context-Aware UI: Configuration forms show relevant examples based on your content types
  • Performance Optimized: Send only the cache tags you need, reducing unnecessary revalidation
  • Individual Requests: Makes separate HTTP requests per cache tag for better debugging

When to Use:

  • Building a headless Drupal site with Next.js frontend
  • Need precise control over which pages get revalidated when content changes
  • Want to optimize cache invalidation performance
  • The core Next.js module's cache tag revalidator doesn't meet your needs

Post-Installation

  1. Enable the Module: drush en next_tag_revalidator
  2. Configure Next.js Sites: Go to Configuration → Web Services → Next.js sites
  3. Edit Your Site: Click "Edit" on your Next.js site configuration
  4. Add Revalidator: Click "Add revalidator" and select "Next.js Cache Tag"
  5. Configure Options: Choose which cache tags to revalidate:
    • Individual entity tags (node:123)
    • Entity list tags (node_list:article)
    • Custom additional tags
  6. Tag Your Next.js Pages: Use the generated cache tags in your Next.js fetch() calls

Additional Requirements

  • Drupal 10 or 11
  • Next.js module - Provides the base Next.js integration
  • Next.js application configured with revalidation endpoints

Similar projects

Core Next.js Module Cache Tag Revalidator:

The base Next.js module includes a "Cache Tag" revalidator, but it has limitations:

This module addresses these limitations with configurable, optimized cache tag revalidation designed specifically for Next.js applications.

Supporting this Module

This module is developed as an open-source community project. You can support development by:

  • Reporting bugs and feature requests
  • Contributing code improvements
  • Sharing your use cases and feedback
  • Helping with documentation

Community Documentation

Usage Examples

Tag your Next.js pages/components with the appropriate cache tags:

// Individual entities
export default async function Article({ params }) {
  const article = await fetch(`${drupalUrl}/jsonapi/node/article/${params.id}`, {
    next: { tags: [`node:${params.id}`] }
  });
  // ...
}

// Entity lists
export default async function ArticleList() {
  const articles = await fetch(`${drupalUrl}/jsonapi/node/article`, {
    next: { tags: ['node_list:article'] }
  });
  // ...
}

// Custom tags
export default async function HomePage() {
  const data = await fetch(`${drupalUrl}/api/homepage-data`, {
    next: { tags: ['homepage', 'config:system.menu.main'] }
  });
  // ...
}

Cache Tag Patterns

Entity Type Individual Tag List Tag Node node:123 node_list:article Taxonomy Term taxonomy_term:456 taxonomy_list:tags User user:789 user_list:user Custom Entity my_entity:101 my_entity_list:my_bundle

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Aug 2025
Latest release
4 months ago
Releases (12 mo)
1 ▼ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.1 Stable 10–11 Apr 16, 2026
1.0.0 Stable 10–11 Aug 26, 2025
1.0.x-dev Dev 10–11 Aug 25, 2025