<div dir="ltr">Hi Paul,<div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 14, 2013 at 7:56 AM, Paul McInerney <span dir="ltr"><<a href="mailto:Paul.McInerney@faredge.com.au" target="_blank">Paul.McInerney@faredge.com.au</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-AU" link="#0563C1" vlink="#954F72"><div><p class="">

Hi all,<u></u><u></u></p><p class=""><u></u> <u></u></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">I've got varnish currently configured to server cached content for 300 secs. <u></u><u></u></span></p>

<p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><u></u> <u></u></span></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">I've also allowed varnish to accept purge requests (coming from a trusted list of IPs)<u></u><u></u></span></p>

<p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><u></u> <u></u></span></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">Watching varnish (using varnishlog), I can see a  PURGE request get successfully handled (I am sending the purge via php/curl_init  - even if I telnet directly to varnish and issue a direct http request, I still get the same 'success')</span></p>

</div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-AU" link="#0563C1" vlink="#954F72">

<p class="" style="background-color:white"><span style="color:rgb(34,34,34)">(..</span><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">)<u></u></span></p><p class="" style="background-color:white">

<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">Here are the relevant snippets from the default.vcl<u></u><u></u></span></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><u></u> <u></u></span></p>

<p class="" style="background-color:white"><span style="font-size:10pt"><font face="Arial, sans-serif">(..)</font></span><span style="font-family:Arial,sans-serif;font-size:10pt"> </span><br></p><p class="" style="background-color:white">

<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">sub vcl_hit {<u></u><u></u></span></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">   if (req.request == "PURGE") {<u></u><u></u></span></p>

<p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">    error 200 "Purged.";<u></u><u></u></span></p><p class="" style="background-color:white">

<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">    }<u></u><u></u></span></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">}<u></u><u></u></span></p>

<p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><u></u> <u></u></span></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">sub vcl_miss {<u></u><u></u></span></p>

<p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">    if (req.request == "PURGE") {<u></u><u></u></span></p><p class="" style="background-color:white">

<span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">    error 404 "Not in cache.";<u></u><u></u></span></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">  }<u></u><u></u></span></p>

<p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)">}<u></u><u></u></span></p><p class="" style="background-color:white"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><u></u> </span></p>

</div></blockquote><div><br></div><div>You need to add purge statements here. Make it look like this:</div><div><br></div><div><pre style="padding:5px;background-color:rgb(238,255,204);line-height:15px;border-top-width:1px;border-bottom-width:1px;border-style:solid none;border-top-color:rgb(170,204,153);border-bottom-color:rgb(170,204,153)">

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

sub vcl_miss {
        if (req.request == "PURGE") {
                purge;
                error 200 "Purged.";
        }
}</pre></div><div><br></div></div><div><br></div>-- <br><div dir="ltr"><div style="font-size:12.727272033691406px;margin:5px 15px 0px 0px;padding-bottom:5px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">

<table border="0" cellpadding="0" cellspacing="0" style="text-align:start;font-size:12px;line-height:1.5em;font-family:'Helvetica Neue',Arial,sans-serif;color:rgb(102,102,102);width:550px;border-top-width:1px;border-top-style:solid;border-top-color:rgb(238,238,238);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);margin-top:20px;padding-top:5px;padding-bottom:5px">

<tbody><tr><td width="100" style="font-family:arial,sans-serif;margin:0px"><a href="http://www.varnish-software.com/" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.varnish-software.com/static/media/logo-email.png" style="float: left; margin-left: 10px;"></a></td>

<td style="font-family:arial,sans-serif;margin:0px"><b style="font-size:14px;color:rgb(34,34,34)">Per Buer</b><br>CTO | Varnish Software AS<br>Phone: +47 958 39 117 | Skype: per.buer<br><span style="font-weight:bold">We Make Websites Fly!<br>

<br></span><span style="font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;font-weight:bold">Winner of the Red Herring Top 100 Europe Award 2013<br></span><p style="margin:0px;line-height:normal;font-family:Helvetica">

<img src="https://www.varnish-software.com/sites/default/files/redherring_2013_winner_sml.jpg"></p><span style="font-weight:bold"><br></span></td></tr></tbody></table><div></div></div><div style="font-size:12.727272033691406px;margin:15px 0px;clear:both;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">

</div></div>
</div></div>