Purge specific object, not all variants

Dridi Boukelmoune dridi at varni.sh
Mon Feb 20 10:55:44 CET 2017

On Tue, Feb 14, 2017 at 10:37 PM, Danila Vershinin <ciapnz at gmail.com> wrote:
> Hi,
> Theoretical question. Supposedly I want to introduce Vary: by device
> classification: mobile / desktop (via devicedetect etc.)
> How would I go around purging just the specific variant of an object,  i.e.
> purge a page for mobile only?
> The documentation here:
> http://book.varnish-software.com/4.0/chapters/Cache_Invalidation.html
> Mentions that all methods will purge all variants.
> Is it wrong? Do I correctly understand that forced cache miss is the single
> method that allows to purge specific variant of an object?


If you want to purge (that is to say including variants) but don't
want a single purge to span both mobile and desktop classifications,
I'd recommend adding the classification to the hash key and making
sure to purge using the a classification.


More information about the varnish-misc mailing list