Hi,
    I am new to Varnish and during cache invalidation I have a confusion.

a) As per the guide line when I will write 'purge' content management
system send a special HTTP request to Varnish. So, is this request sending
done automatically or my own program need to send a request with
request.method ='PURGE'

b) In the below program to purge a object VCL check is the request is with
'PURGE'. But if I am initiating purge for the first time then how the
req.request will be 'PURGE'?

sub vcl_recv {
        if (req.request == "PURGE") {
                if (!client.ip ~ purge) {
                        error 405 "Not allowed.";
                }
                return (lookup);
        }
}

sub vcl_hit {
        if (req.request == "PURGE") {
                purge;
                error 200 "Purged.";
        }
}

sub vcl_miss {
        if (req.request == "PURGE") {
                purge;
                error 200 "Purged.";
        }


Please help me to understand the same or if you have any better view please
share the same.
-- 
Thanks & Regards,

Souvik Bhattacharya
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to