<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:891621778;
        mso-list-type:hybrid;
        mso-list-template-ids:234764692 68157457 68157465 68157467 68157455 68157465 68157467 68157455 68157465 68157467;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:54.0pt;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:90.0pt;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:126.0pt;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:162.0pt;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:198.0pt;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:234.0pt;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:270.0pt;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        margin-left:306.0pt;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="IT" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello there,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have the following issue with squid (squid-3.5.20-12.el7_6.1.x86_64  on RHEL 7.6)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">A client requests a json with “no-cache” header via proxy.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Squid forwards the request to origin server, which replies with “ETag” header (object is cachable).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Squid stores the object in cache_dir and forwards back to the client.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The client is pushing same request at high rate (~10/sec), regardless its cachable status.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Squid keeps forwarding the request and – here is my issue – keeps storing the same identical object on disk.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have thousands of copies of the same Etag on disk.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is there a way to avoid this? I think Squid should store a single copy per-URL/ETAg of the object.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’d like to avoid an ad-hoc reload-into-ims refresh-pattern.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Here’s an example of headers sequence:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""><o:p> </o:p></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:-18.0pt;mso-list:l0 level1 lfo1">
<b><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">CLIENT
</span></b><span lang="EN-US" style="font-family:Wingdings">à</span><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""> SQUID<o:p></o:p></span></b></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">GET http://xxx.xxx.xxx.xxx/blah/FEED.json HTTP/1.1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Accept-Encoding: gzip<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Content-Language: en-US<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Cache-Control: no-cache<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Pragma: no-cache<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Host: xxx.xxx.xxx.xxx<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Proxy-Connection: keep-alive<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""><o:p> </o:p></span></p>
<ol style="margin-top:0cm" start="2" type="1">
<li class="MsoListParagraph" style="margin-left:-18.0pt;mso-list:l0 level1 lfo1">
<b><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">SQUID </span>
</b><span lang="EN-US" style="font-family:Wingdings">à</span><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""> ORIGIN SERVER<o:p></o:p></span></b></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">GET /blah/FEED.json HTTP/1.1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Accept-Encoding: gzip<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Content-Language: en-US<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Pragma: no-cache<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Host: xxx.xxx.xxx.xxx<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Via: 1.1 RP-PRXSQUID-2 (squid/3.5.20)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">X-Forwarded-For: unknown<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Cache-Control: no-cache<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Connection: keep-alive<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""><o:p> </o:p></span></p>
<ol style="margin-top:0cm" start="3" type="1">
<li class="MsoListParagraph" style="margin-left:-18.0pt;mso-list:l0 level1 lfo1">
<b><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">ORIGIN SERVER
</span></b><span lang="EN-US" style="font-family:Wingdings">à</span><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""> SQUID<o:p></o:p></span></b></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">HTTP/1.1 200 OK<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Server: Apache/2.2.16 (Debian)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Last-Modified: Fri, 26 Jun 2020 11:46:00 GMT<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">ETag: "62b905-a7cfa-5a8fb40bdee00"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Accept-Ranges: bytes<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Content-Length: 687354<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Keep-Alive: timeout=4, max=45<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Connection: Keep-Alive<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Content-Type: text/plain<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""><o:p> </o:p></span></p>
<ol style="margin-top:0cm" start="4" type="1">
<li class="MsoListParagraph" style="margin-left:-18.0pt;mso-list:l0 level1 lfo1">
<b><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">SQUID </span>
</b><span lang="EN-US" style="font-family:Wingdings">à</span><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console""> CLIENT<o:p></o:p></span></b></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">HTTP/1.1 200 OK<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Date: Fri, 26 Jun 2020 11:52:15 GMT<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Server: Apache/2.2.16 (Debian)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Last-Modified: Fri, 26 Jun 2020 11:46:00 GMT<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">ETag: "62b905-a7cfa-5a8fb40bdee00"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Accept-Ranges: bytes<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Content-Length: 687354<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Content-Type: text/plain<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">X-Cache: MISS from RP-PRXSQUID-2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">X-Cache-Lookup: HIT from RP-PRXSQUID-2:3128<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Via: 1.1 RP-PRXSQUID-2 (squid/3.5.20)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Lucida Console"">Connection: keep-alive<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ST<o:p></o:p></span></p>
</div>
____________________________________________________________________________________ La presente comunicazione ed i suoi allegati e' destinata esclusivamente ai destinatari. Qualsiasi suo utilizzo, comunicazione o diffusione non autorizzata e' proibita. Se
 ha ricevuto questa comunicazione per errore, la preghiamo di darne immediata comunicazione al mittente e di cancellare tutte le informazioni erroneamente acquisite. Grazie This message and its attachments are intended only for use by the addressees. Any use,
 re-transmission or dissemination not authorized of it is prohibited. If you received this e-mail in error, please inform the sender immediately and delete all the material. Thank you.
</body>
</html>