Include Query String Variants in Purge Request

Created on 8 September 2022, almost 2 years ago
Updated 22 May 2023, about 1 year ago

This is a great module and should resolve a lot of confusion with our content managers! I'm surprised this functionality is not part of the base Purge module.

Problem/Motivation

The purge requests appear to only purge the base file URL, but any versions of files cached under URLs with a query string remain. (For example, a URL with social media tracking tags or Google UTM campaign codes appended.)

Steps to reproduce

  • Upload a file on a system with Varnish, Purge and Purge File enabled.
  • Populate the cache by viewing the file in a browser both with and without query string variants.
  • Delete the file in such a way that Purge File issues its current Varnish purge commands.
  • Revisit the original URLs. The base file URL should return a 404 not-found error, but URLs with query strings will still serve the cached copy of the file.

Proposed resolution

Provide site managers with the ability to use either the 'url' Purge invalidator (the current only option), or the 'wildcardurl' invalidator, which allows one to append "*" at the end of the purge URL.

Remaining tasks

Testing and review.

User interface changes

Configure enable/disable for this additional behavior.

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DaleTrexel Minnesota, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024