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). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). 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.

Rebuilder

2 sites Security covered
View on drupal.org

This module allows developers to selectively rebuild specific parts of the Drupal cache instead of performing a full cache clear. It provides Drush commands and a user interface to manage these targeted rebuilds, improving performance for complex sites.

Motivation

When you change something specific in your module/profile/theme code but:

  1. A full cache clear feels excessive since most of it is unrelated to your change.
  2. It's often hard to remember exactly what service or command can clear/rebuild what, and methods to do so vary by name.

This module provides a plug-in manager, base plug-in, several commonly used plug-ins, along with Drush commands and a UI sub-module to invoke them as needed.

Requirements

  • Drupal 10.4 or 11.1
  • PHP 8.1 or newer

Optional

  • Drush 11 or newer

Usage

Once installed, two Drush commands become available:

  1. rebuilder - runs a specified Rebuilder; alias for rebuilder:run.
  2. rebuilder:list - lists all available Rebuilder plug-ins.

A Rebuilder UI sub-module is also provided that adds an administration form where individual Rebuilders can be invoked. Once the module is enabled, this can be found under:

Administration / Configuration / Development / Performance / Rebuilder

or the path: /admin/config/development/performance/rebuilder

Questions and answers

Why not just clear the cache?
On smaller and simpler sites, this isn't much of a problem, but if you're running a larger and more complex site, the performance hit can be significant, slowing down the site for everyone. It also isn't necessary in most cases due to how well designed Drupal's cache API is, allowing precise invalidation of just the areas of the cache that are relevant.
Can I write my own plug-ins?
Absolutely! In fact, that's one of the reasons this module is built around a plug-in manager rather than hard-coding it all. See the Drupal Plug-in API documentation for how to implement your own.
Why is this named Rebuilder and not Rebuild?
There's already a Drush Rebuild project with the Composer name of drupal/rebuild. Additionally, the cache:rebuild Drush command has an alias of rebuild. Rebuilder was chosen as a name to avoid collision with these.

Activity

Total releases
1
First release
Sep 2025
Latest release
9 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.3.0 Stable Sep 21, 2025