Image style changes and purging

Created on 1 November 2017, over 7 years ago
Updated 25 June 2024, 9 months ago

I've got a site, we have a pretty common thing for a Drupal website:

  • Image uploads
  • Image styles
  • Varnish

Varnish is configured to cache images for a long time, but also configured to respond to BANs using the Purge module to send the appropriate HTTP request. We are invalidating entries in the cache via cache tags.

All is well and good until we change the config for an image style, or replace the original image style and flush all the derivatives.
Varnish will still hold the originally cached image, until it's expired from the cache, which may not be for a long time.

I'm just wondering how other people have solved this sort of issue?

Currently I'm thinking that we will to configure some kind of purger based on URL path, and then capture the events that will cause the content of those URLs to change and push purge events into the purge queue. Is that what other people do, or do they wait for the assets to expire in Varnish naturally?

πŸ’¬ Support request
Status

Closed: works as designed

Version

3.0

Component

Miscellaneous

Created by

πŸ‡¬πŸ‡§United Kingdom steven jones

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.

  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    I think you'd have to use one of the underlying implementing modules (varnish_purge, acquia_purge, etc) to get what you're desiring here.

Production build 0.71.5 2024