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.

Varnish purger

8,921 sites Security covered
View on drupal.org

This module integrates with the Purge module to invalidate content in Varnish. It allows for clearing cached content from Varnish using BAN commands and offers basic support for image bans.

What is this?

This is the Varnish purger for the Purge module.

Project name and module name

Because of some bad naming in the start - the project name is varnish_purge, but the module itself is called varnish_purger. Sorry for that, but it's hard to move namespace after you have registred one.

Varnish configuration

To work with cache tags you need to have a Varnish vcl-file that implements is, here is a suggestion for defaul.vcl for Varnish 4 and using BAN.

Supported Varnish versions

This module has nothing to do with which version of version you are using, as long as Varnish supports BANs, this module should work - so use Varnish 3 and up with this module.

Image bans

Since release of 8.x-1.7 we now have basic support for image bans with the sub module varnish_image_purge, using a VCL setting like the following:

sub vcl_recv {
  if (req.method == "URIBAN") {
    ban("req.http.host == " + req.http.host + " && req.url == " + req.url);
    # Throw a synthetic page so the request won't go to the backend.
    return (synth(200, "Ban added."));
  }
}

Activity

Total releases
1
First release
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
8.x-2.3 Stable Feb 18, 2025