<div dir="ltr"><div dir="ltr"><div>Hi Amos,</div><div><br></div><div>This is what I see when the download is in progress:</div><div><br></div><div>KEY 44000000000000000902000000000000</div><div> STORE_PENDING NOT_IN_MEMORY SWAPOUT_NONE PING_DONE</div><div> RELEASE_REQUEST,DISPATCHED,PRIVATE,VALIDATED</div><div> LV:1536379799 LU:1536379801 LM:1532110990 EX:-1</div><div> 4 locks, 1 clients, 1 refs</div><div> Swap Dir -1, File 0XFFFFFFFF</div><div> GET <a href="https://example.com/DhAskLOUpvRG2oeR_f_FxYTyLVHIN5esRF-LXOUKwkwyT0TOf6xO-AUm3KaM">https://example.com/DhAskLOUpvRG2oeR_f_FxYTyLVHIN5esRF-LXOUKwkwyT0TOf6xO-AUm3KaM</a></div><div> inmem_lo: 99225582</div><div> inmem_hi: 99324372</div><div> swapout: 0 bytes queued</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Sep 8, 2018 at 9:44 AM Hariharan Sethuraman <<a href="mailto:srnhari@gmail.com">srnhari@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I see the response can be cached. Will try out increasing logging level of cache.log</div><div><pre id="m_-4027704844115718367gmail-response" style="font-size:10pt;font-family:Courier,monospace;background-color:rgb(17,17,17);color:rgb(221,221,221);border-radius:0.75em;border:1px solid black;padding:1em 0px;margin-bottom:0px;overflow-x:auto"><span class="m_-4027704844115718367gmail-status"><br class="m_-4027704844115718367gmail-Apple-interchange-newline">HTTP/1.1 200 OK</span>
<span class="m_-4027704844115718367gmail-hdr">Date: Sat, 08 Sep 2018 04:10:38 GMT</span>
<span class="m_-4027704844115718367gmail-hdr">Server: Apache/2.2</span>
<span class="m_-4027704844115718367gmail-hdr">Keep-Alive: timeout=5, max=100</span>
<span class="m_-4027704844115718367gmail-hdr">Connection: Keep-Alive</span>
<span class="m_-4027704844115718367gmail-hdr">Transfer-Encoding: chunked</span>
<span class="m_-4027704844115718367gmail-hdr">Content-Type: text/plain;; charset=ISO-8859-1</span></pre><p class="m_-4027704844115718367gmail-options" style="color:rgb(17,17,17);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;margin-top:0.2em;margin-bottom:2em;padding-top:0px;text-align:center;font-size:0.75em"><span class="m_-4027704844115718367gmail-option" title="how large the response headers are, including the status line" style="padding-right:2em">response headers: 203 bytes</span> <span class="m_-4027704844115718367gmail-option" title="how large the response body is" style="padding-right:2em">body: 21 bytes</span> <span class="m_-4027704844115718367gmail-option" title="how much using chunked encoding adds to the response size" style="padding-right:2em">transfer overhead: 9 bytes</span> <br style="clear:both;padding-right:2em"><span class="m_-4027704844115718367gmail-option" title="View this response body (with any gzip compression removed)" style="padding-right:2em"><a href="https://redbot.org/?uri=https%3A%2F%2Fdl.cisco.com%2Fpcgi-bin%2Fswdld%2Fdownload.cgi%3Fdwnld_code%3DxhMnkw8Z-oFg8Jvk7BeSZnkmIdO48GTAA01cTlDABiH7c9QJsq9s5ypIQWgQxY4cI66yKQsWgjvIpCgr8_DGemwm_6VqWfSJQ8Xonly7l-DcKbz9kqMQXOHnp2G1BHj_-wp1DhAskLOUpvRG2oeR_f_FxYTyLVHIN5esRF-LXOUKwkwyT0TOf6xO-AUm3KaM&req_hdr=Authentication%3ABearer+HQdHyp1lCj2cZxGYPlzEqlEuGxww#" id="m_-4027704844115718367gmail-body_view" accesskey="b" target="_blank">view body</a></span> <span class="m_-4027704844115718367gmail-option" title="View a HAR (HTTP ARchive, a JSON format) file for this test" style="padding-right:2em"><a href="https://redbot.org/?id=9ml2eaa9&req_hdr=Authentication%3ABearer%20HQdHyp1lCj2cZxGYPlzEqlEuGxww&req_hdr=User-Agent%3ARED/1%20(https://redbot.org/)&req_hdr=Referer%3Ahttps://dl.cisco.com/pcgi-bin/swdld/download.cgi?dwnld_code%3DxhMnkw8Z-oFg8Jvk7BeSZnkmIdO48GTAA01cTlDABiH7c9QJsq9s5ypIQWgQxY4cI66yKQsWgjvIpCgr8_DGemwm_6VqWfSJQ8Xonly7l-DcKbz9kqMQXOHnp2G1BHj_-wp1DhAskLOUpvRG2oeR_f_FxYTyLVHIN5esRF-LXOUKwkwyT0TOf6xO-AUm3KaM&check_name=default&format=har" accesskey="h" target="_blank">view har</a></span> <span class="m_-4027704844115718367gmail-option" title="Save these results for future reference" style="padding-right:2em"><a href="https://redbot.org/?uri=https%3A%2F%2Fdl.cisco.com%2Fpcgi-bin%2Fswdld%2Fdownload.cgi%3Fdwnld_code%3DxhMnkw8Z-oFg8Jvk7BeSZnkmIdO48GTAA01cTlDABiH7c9QJsq9s5ypIQWgQxY4cI66yKQsWgjvIpCgr8_DGemwm_6VqWfSJQ8Xonly7l-DcKbz9kqMQXOHnp2G1BHj_-wp1DhAskLOUpvRG2oeR_f_FxYTyLVHIN5esRF-LXOUKwkwyT0TOf6xO-AUm3KaM&req_hdr=Authentication%3ABearer+HQdHyp1lCj2cZxGYPlzEqlEuGxww#" id="m_-4027704844115718367gmail-save" accesskey="s" target="_blank">save</a></span></p><h3 style="color:rgb(17,17,17);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9em;margin:0px;padding:0px">General</h3><ul style="color:rgb(17,17,17);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;margin-top:0.2em;margin-left:12pt"><li class="m_-4027704844115718367gmail-bad m_-4027704844115718367gmail-note" style="padding-left:4pt;color:rgb(136,0,0)">The Content-Type header's syntax isn't valid.</li><li class="m_-4027704844115718367gmail-warning m_-4027704844115718367gmail-note" style="padding-left:4pt;color:rgb(102,102,0)">The Keep-Alive header is deprecated.</li><li class="m_-4027704844115718367gmail-good m_-4027704844115718367gmail-note" style="padding-left:4pt;color:rgb(0,102,0)">The server's clock is correct.</li></ul><h3 style="color:rgb(17,17,17);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9em;margin:0px;padding:0px">Caching</h3><ul style="color:rgb(17,17,17);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;margin-top:0.2em;margin-left:12pt"><li class="m_-4027704844115718367gmail-info m_-4027704844115718367gmail-note" style="padding-left:4pt">This response allows all caches to store it.</li><li class="m_-4027704844115718367gmail-warning m_-4027704844115718367gmail-note" style="padding-left:4pt;color:rgb(102,102,0)">This response allows a cache to assign its own freshness lifetime.</li></ul><div><div>Thanks,</div><div>Hari</div><div><br class="m_-4027704844115718367gmail-Apple-interchange-newline"></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 7, 2018 at 11:01 PM Amos Jeffries <<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 8/09/18 4:46 AM, Hariharan Sethuraman wrote:<br>
> Hi team,<br>
> <br>
> I have created directories using squid -z and then triggered squid -f<br>
> /etc/squid/squid.conf -NYCd 1. Find (1) debug info below. And below (2)<br>
> are the cache directory and squid-config. <br>
> <br>
> (1) - debug info:<br>
> squidclient -h localhost cache_object://localhost/ mgr:objects >>> this<br>
<br>
You do not need to pass squidclient the cache_object: URLs, nor<br>
localhost as server. Just:<br>
<br>
squidclient mgr:objects<br>
<br>
Also, what *exactly* did that report tell you?<br>
"cache" is more than just the disk storage area.<br>
<br>
<br>
> was showing the entry when the download was going on and disappeared<br>
> after the download complete(~290MB) on the browser.<br>
<br>
<br>
What I am thinking reading that is that probably Squid used the cache<br>
storage area as a temporary location for the bytes of a very large<br>
object, but then removed it once the response was completely delivered<br>
since it was not cacheable.<br>
<br>
Details matter. The "~" means "approximately" and your config says<br>
*exactly* 300 MByte is the upper limit.<br>
<br>
So an object which is "approximately 290" may in truth be *over* 300<br>
and thus not permitted to cache.<br>
<br>
<br>
NP: you can use the tool at <a href="http://redbot.org" rel="noreferrer" target="_blank">redbot.org</a> to check URL cacheability. It<br>
will also tell you about any caching related HTTP compliance issues with<br>
that resource.<br>
Or you can set "debug_options 11,2" in your squid.conf and check the<br>
exact HTTP messages your proxy is dealing with.<br>
<br>
<br>
When I checked the<br>
> du of cache directory, it is intact with 200KB<br>
<br>
...<br>
> ..<br>
> cache allow all<br>
> strip_query_terms off<br>
<br>
<br>
Above are defaults. No need to configure since Squid-3.<br>
<br>
> ..<br>
> cache_dir ufs /var/spool/squid/cache 2000 16 256<br>
> maximum_object_size 300 MB<br>
> ..<br>
> range_offset_limit -1<br>
> ..<br>
> url_rewrite_access allow all<br>
> url_rewrite_program /usr/bin/python /usr/share/proxypass.py<br>
<br>
Not relevant, except that when testing the URL like with <a href="http://redbot.org" rel="noreferrer" target="_blank">redbot.org</a> you<br>
need to use the URL this helper produces instead of what was passed into<br>
Squid by the client.<br>
<br>
<br>
> <br>
> http_access deny all<br>
> ...<br>
> always_direct deny all<br>
> <br>
> (a) Please let me know what am missing to enable cache.<br>
<br>
Cache is enabled and Squid caches as much as it can by default - within<br>
the limits prescribed by HTTP specification and your config settings.<br>
<br>
So the only thing to do is ensure that you do not actively *prevent*<br>
caching from happening somehow.<br>
<br>
<br>
> (b) Also "squidclient -h localhost cache_object://localhost/<br>
> mgr:objects" hope this command will show the entry even after caching.<br>
> <br>
<br>
It (well, "squidclient mgr:objects") should show all objects currently<br>
known to the proxy. That will mostly be cached objects (both disk and<br>
in-memory), but also included temporary in-transit objects.<br>
<br>
Amos<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div>
</blockquote></div>