Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Rebuilder

Security covered Under active development 2 sites

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.
Drupal 10–11

Ask your assistant about Rebuilder

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Apr 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.3.0 Stable 10–11 Sep 21, 2025
1.2.0 Stable 10–11 PHP 8.1 Sep 18, 2024
1.1.0 Stable 10 PHP 8.1 Apr 3, 2024