<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<p>Hello,<br>
</p>
<p>I've limited the "vary" usage and gained some hits by making
these modifications (in blue) to the http.cc code:<br>
</p>
<p> while (strListGetItem(&vary, ',', &item, &ilen,
&pos)) {<br>
SBuf name(item, ilen);<br>
if (name == asterisk) {<br>
<b> <font color="#3333ff">/*</font></b>
vstr.clear(); <br>
break; <font color="#3333ff"><b>*/ </b><br>
<b> continue;</b></font><br>
}<br>
name.toLower();<br>
<br>
<font color="#3333ff"><b> if (name.cmp("accept", 6) != 0
&&</b><b><br>
</b><b> name.cmp("user-agent", 10) != 0)</b><b><br>
</b><b> continue;</b></font><br>
<br>
if (!vstr.isEmpty())<br>
vstr.append(", ", 2);</p>
<p><br>
</p>
<br>
<pre class="moz-signature" cols="72">--
Best Regards,
Heiler Bemerguy
Network Manager - CINBESA
55 91 98151-4894/3184-1751</pre>
<br>
<br>
<div class="moz-cite-prefix">Em 07/10/2016 06:26, Hardik Dangar
escreveu:<br>
</div>
<blockquote
cite="mid:CA+sSnVai079zNS6X+Rni9qaRKOAt6PF+nrZQhBR462zL1zWZuA@mail.gmail.com"
type="cite">
<div dir="ltr">Hey Alex,
<div><br>
</div>
<div>I totally get that Vary code is different, I have been
trying to understand squid code for last few days although my
C, C++ skills are very limited I am able to understand bits
and pieces here and there. I have also read HTTP 1.1 specs for
cache ( <a moz-do-not-send="true"
href="https://tools.ietf.org/html/rfc2616#section-13">https://tools.ietf.org/html/rfc2616#section-13</a>
)</div>
<div><br>
</div>
<div>After doing fair bit of research I believe we need to two
things, </div>
<div><br>
</div>
<div>1) start a campaign to convince webmasters to update their
server configs, for that to happen I am doing my research on
apache and Nginx servers on how to implement ( HTTP 1.1 spec
cache guidelines ) and will provide them copy paste configs
for all requests or for the file types like
deb,apk,rpm,exe(binary files),etc...</div>
<div><br>
</div>
<div>I am documenting that here,</div>
<div><a moz-do-not-send="true"
href="https://hardikdangar.github.io/thecacheproject/">https://hardikdangar.github.io/thecacheproject/</a><br>
</div>
<div><br>
</div>
<div>and once I finish everything I will post everything at the
squid-dev list here so all of you can look at it and if you
guys approve it, I will personally try to contact the big
providers and send them above page with solutions. and will
ask community support and will publish it to twitter and other
social sites to get support.</div>
<div><br>
</div>
<div>2) I want to build a module which will first handle Vary: *
requests and convert it into Vary: Accept-Encoding or
something similar but only for the ACL's specified by cache
administrator.</div>
<div><br>
</div>
<div>Next, there are use cases like GitHub which are very
difficult to handle but I feel there is a way we can handle
those use cases so I will build ACL for those.</div>
<div><br>
</div>
<div>For this, i am trying to understand squid code, After
looking at dev docs, I understand how the request is handled
at clientBeginRequest. But I am very confused at how squid
handles the response. I know client_side_reply.cc is the file
where the response is handled but I am not sure
how StoreEntry::checkCachable() method in store.cc is called
before it as that is the method i get in squid logs when the
cache is denied.</div>
<div><br>
</div>
<div>Basically, I need to know how to debug line by line source
for squid. Right now my method of testing involves building
squid and adding debug lines and its very slow process as it
takes time every time. Can you help me with this ? is there a
way i could send a request directly to squid source file i.e
debug source code line by line ? If so what are the tools
required and how to set it up ?</div>
<div><br>
</div>
<div>Again, I am sorry if i am asking too much but my C
experience is very limited and i feel like i am asking very
naive questions but these are very difficult for me at this
stage and i really appreciate all of the squid dev teams who
is been answering all of my questions. Thank you very much for
that.</div>
<div>--------</div>
<div><br>
</div>
<div>I just want a better cache support for squid and modern day
use cases.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Oct 6, 2016 at 11:25 PM, Alex
Rousskov <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:rousskov@measurement-factory.com"
target="_blank">rousskov@measurement-factory.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="">On 10/06/2016 11:14 AM, Linda A. Walsh wrote:<br>
> Alex Rousskov wrote:<br>
>> We can, but ignoring Vary requires more/different
work than adding<br>
>> another refresh_pattern option. Vary is not a
refresh mechanism so<br>
>> different code areas need to be modified to
ignore (but still forward!)<br>
>> Vary.<br>
<br>
<br>
</span><span class="">> I can't say for certain, but
I'd give it a 75% shot of it being<br>
> used as a forced-refresh pattern<br>
<br>
</span>The [ab]use cases do not matter here -- the _code_
handling Vary is very<br>
different from the code handling refresh logic. That
difference is<br>
natural and unavoidable because the two protocol mechanisms
are very<br>
different, even if they both can be and are used to create
the same effect.<br>
<span class="HOEnZb"><font color="#888888"><br>
Alex.<br>
</font></span>
<div class="HOEnZb">
<div class="h5"><br>
______________________________<wbr>_________________<br>
squid-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.<wbr>org</a><br>
<a moz-do-not-send="true"
href="http://lists.squid-cache.org/listinfo/squid-users"
rel="noreferrer" target="_blank">http://lists.squid-cache.org/<wbr>listinfo/squid-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
squid-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squid-cache.org/listinfo/squid-users">http://lists.squid-cache.org/listinfo/squid-users</a>
</pre>
</blockquote>
<br>
</body>
</html>