Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

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

Activity

Total releases
3
First release
Aug 2025
Latest release
3 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

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