HIT after PURGE & Restart

Dridi Boukelmoune dridi at varni.sh
Thu Apr 13 14:45:15 CEST 2017


On Thu, Apr 13, 2017 at 8:48 AM, Guillaume Quintard
<guillaume at varnish-software.com> wrote:
> Is there any chance that:
> - someone requested the object between the purge and the subsequent hit?
> - you re-processed the request again, changing the cache (non-idempotent URL
> rewrite, maybe?)

At first glance things look OK on 4.0, 4.1, 5.0 and 5.1:

    varnishtest "purge+restart should miss"

    server s1 {
        rxreq
        txresp -body first

        rxreq
        txresp -body second
    } -start

    varnish v1 -vcl+backend {
        sub vcl_recv {
            if (req.method == "PURGE") {
                return (purge);
            }
        }

        sub vcl_purge {
            set req.method = "GET";
            return (restart);
        }
    } -start

    client c1 {
        txreq
        rxresp
        expect resp.body == first

        txreq -req PURGE
        rxresp
        expect resp.body == second
    } -run

I will try a more involved test later on.

Dridi



More information about the varnish-misc mailing list