<div dir="ltr"><div>Hi Amos,<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">302 and 307 are not because as their status description indicates they 
are *temporary* results. They can only be cached if there are explicit 
details from the server indicating for how long.<br></blockquote><br></div>You were right. After I added header Cache-Control "max-age=60, must-revalidate" to the redirects, then the response was cached. Thank you for <span id="gmail-m_6902079747454010218gmail-result_box" class="gmail-m_6902079747454010218gmail-short_text" lang="en"><span class="gmail-m_6902079747454010218gmail-alt-edited">clarification.<br></span></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">301 should be cached unless the object would need revalidation immediately.</blockquote><div class="gmail_extra"><br></div><div class="gmail_extra">But for 301 I always get MISS - <span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-">with and without a cache-control header:<br><br><span style="font-family:monospace,monospace">$ curl -v http:/<a href="http://test.example.com/img301.jpg">test.example.com/img301.jpg</a><br><br>> GET /img301.jpg HTTP/1.1<br>> Host: </span></span></span><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><a href="http://test.example.com">test.example.com</a><br></span></span>> User-Agent: curl/7.50.1<br>> Accept: */*<br>><br>< HTTP/1.1 301 Moved Permanently<br>< Date: Thu, 21 Sep 2017 06:44:41 GMT<br>< Server: Apache<br>< Cache-Control: max-age=60, must-revalidate<br>< Location: http://</span></span></span><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><a href="http://test.example.com">test.example.com</a></span></span>/img.svg<br>< Content-Length: 247<br>< Content-Type: text/html; charset=iso-8859-1<br>< X-Cache: MISS from </span></span></span><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><squid-proxy><br></span>< X-Cache-Lookup: MISS from </span></span></span><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><squid-proxy></span>:3128</span><br><br></span></span></div><div class="gmail_extra"><span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-">I can't find any information on Squid wiki or via Google if the </span></span>object need revalidation immediately.</div><div class="gmail_extra"><br><br></div><div class="gmail_extra">I use Squid 3.4.14 from CentOS 6 package squid34-3.4.14-15.el6.x86_64.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">With best regards,<br><br></div><div class="gmail_extra">zigi<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 19, 2017 at 5:17 PM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 20/09/17 02:00, kAja Ziegler wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi all,<br>
<br>
   I want to ask why my Squid does not cache redirects 301, 302 and 307. See anomised example below. Even if I call the URL more times or I open it in the browser, I always get MISS independently of the return code 301, 302 or 307.<br>
</blockquote>
<br>
302 and 307 are not because as their status description indicates they are *temporary* results. They can only be cached if there are explicit details from the server indicating for how long.<br>
<br>
301 should be cached unless the object would need revalidation immediately.<br>
<br>
<br>
Amos<br>
______________________________<wbr>_________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.<wbr>org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/l<wbr>istinfo/squid-users</a><br>
</blockquote></div><br></div></div>