Drupal is a registered trademark of Dries Buytaert
Field Group 4.1.0-alpha4 New alpha version released for module field_group (4.1.0-alpha4). CKEditor 5 Plugin Pack 1.5.4 Minor update available for module ckeditor5_plugin_pack (1.5.4). CKEditor 5 Premium Features 1.8.3 Minor update available for module ckeditor5_premium_features (1.8.3). Drupal Canvas 1.9.0 Minor update available for module canvas (1.9.0). CKEditor 4 LTS - WYSIWYG HTML editor 1.0.5 Minor update available for module ckeditor_lts (1.0.5). Token Content Access 3.1.2 Minor update available for module tca (3.1.2). Islandora Mirador 3.0.0 Major update available for module islandora_mirador (3.0.0). Protected Content 10.1.123 Minor update available for module proc (10.1.123). Configuration development 8.x-1.12 Module config_devel updated after 8 months of inactivity (8.x-1.12). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Introduction

This module places updated versions of content that have been invalidated into internal and external caches, a process known as cache warming.

Explanation

As requests are made to the site, the URLs queuer module maintains a table mapping cache tags for the pages to URLs. Once content edits and updates trigger Drupal core's internal cache invalidation, the invalidations are registered by the URLs queuer module. URLs queuer then triggers external invalidations by URL for purgers that support it.

The Purge Cache Warmer module is a Purge purger plugin that is fired for each URL invalidation. It is intended to be executed after all other purgers have fired, and the caches are clear. For every URL invalidation invoked, the warmer makes an external HTTP request to the site. This ensures that for any page that is purged from cache a fresh copy is immediately reloaded into your caching architecture.

Because it works from the traffic registry that the URLs queuer maintains, it warms pages that real visitors have actually requested, rather than crawling the whole site.

Requirements

This module requires the following modules:

The 2.x series requires Drupal 11. Earlier releases declared core: 8.x and cannot be installed on Drupal 9 or later.

Configuration

  • Set up the Purge module (see instructions here).
  • Set up the URLs queuer module (see instructions here).
  • drush en purge_cache_warmer --yes
  • Head over to admin/config/development/performance/purge
  • Add Cache Warmer to the purgers.
  • Reorder the purgers so that Cache Warmer is last in the execution order.
  • To achieve accurate URL based cache invalidation, it is best to take a head start by training the traffic registry that the URLs queuer maintains: wget -r -nd --delete-after -l100 --spider https://example.com/

Recommendations

Since the module involves external calls back to the site, it is recommended to uninstall purge_processor_lateruntime and instead process purge invalidations using an external cron invoking Drush.

  • drush pm:uninstall purge_processor_lateruntime
  • drush p:processor-add drush_purge_queue_work
  • To process the queue, have your external cron invoke drush p:queue-work
  • Running at a one minute external cron is recommended.

Behavior worth knowing

  • TLS certificates are verified. If you warm an https origin using a self signed or internal CA certificate, that certificate has to be trusted by the web server.
  • Redirects are not followed. The invalidated URL is the one that needs warming, and the redirect response is itself what the cache should hold.
  • A URL that answers 404 counts as warmed, because the caches in front of Drupal then hold a current copy. Server errors, and 408, 425 and 429, are retried.
  • Requests use a 6 second timeout and a 2 second connect timeout. Purge rejects a time hint above 10 seconds and sizes its queue leases from it, so a page that needs longer than that to render will not be warmed.

Similar modules

Warmer also warms caches, but on cron over configurable entity and CDN queues, decoupled from invalidation. Use this module instead when you want warming tied directly to Purge's invalidation chain, so that exactly what was purged is warmed, in order, immediately after it is purged.

Activity

Total releases
1
First release
Jul 2026
Latest release
2 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
2.0.0-beta1 Pre-release Jul 29, 2026