[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-misc
Subject: purge_url
From: des () linpro ! no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=)
Date: 2008-01-08 15:42:55
Message-ID: ujrodbwfhmo.fsf () login ! linpro ! no
[Download RAW message or body]
Erik <duja at torlen.net> writes:
> [redacted]
>
> sub vcl_recv {
> if (req.http.host == "10.1.1.54" || req.http.host == "test.mysite.com") {
> set req.http.host = "www.mysite.com";
> }
>
> if (req.request == "PURGE") {
> if (client.ip ~ purge) {
> purge_url(req.url);
> }
> }
> }
>
> sub vcl_miss {
> if (req.request == "PURGE") {
> error 404 "The url could not be found in the cache.";
> }
> }
>
> sub vcl_hit {
> if (req.request == "PURGE") {
> set obj.ttl = 0s;
> error 200 "Purged successfully!";
> }
> }
You are mixing two different purge mechanisms. I think what you want
is listed in the EXAMPLES section in the vcl(7) manual page.
Also, the PURGE request you showed did not include a Host: header at
all, so your host normalization code never kicked in, and you tried to
purge a different document from the one you later requested.
DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic