<html><head></head><body><div class="ydp6c689fbfyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0);"><span><pre style="white-space: pre-wrap; color: rgb(0, 0, 0);">Here you have it:</pre><pre style="white-space: pre-wrap; color: rgb(0, 0, 0);"><br></pre><pre style="white-space: pre-wrap; color: rgb(0, 0, 0);"><span><div># The data on which the hashing will take place</div><div>sub vcl_hash {</div><div> hash_data(req.url);</div><div> if (req.http.host) {</div><div> hash_data(req.http.host);</div><div> } else {</div><div> hash_data(server.ip);</div><div> }</div><div> # If the client supports compression, keep that in a different cache</div><div> if (req.http.Accept-Encoding) {</div><div> hash_data(req.http.Accept-Encoding);</div><div> }</div><div> return (lookup);</div><div>}</div></span><br></pre><pre style="white-space: pre-wrap; color: rgb(0, 0, 0);"><br></pre><pre style="white-space: pre-wrap; color: rgb(0, 0, 0);"><br></pre><pre style="white-space: pre-wrap; color: rgb(0, 0, 0);">>><i> However I realized that from time to time redirects stop working and I
</i>>><i> have to purge the Varnish cache and then the redirects work again.
</i>
>Can you share the code in your vcl_hash() function? My immediate guess would be that it's not taking into >account the protocol of the request (http vs. https) and giving you wrong cache hits as a result.
>Mattias</pre></span><br></pre></span></div></body></html>