[squid-users] Caching http google deb files

Eliezer Croitoru eliezer at ngtech.co.il
Fri Oct 21 19:07:45 UTC 2016


Instead of modifying the code, would you consider to use an ICAP service
that will mangle this?
I am unsure about the risks about doing so but why patch the sources if you
can resolve it with the current mainstream capabilities and API?

Eliezer

----
Eliezer Croitoru <http://ngtech.co.il/lmgtfy/> 
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer at ngtech.co.il
 

From: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] On
Behalf Of Heiler Bemerguy
Sent: Friday, October 21, 2016 18:21
To: squid-users at squid-cache.org
Subject: Re: [squid-users] Caching http google deb files


Hello,
I've limited the "vary" usage and gained some hits by making these
modifications (in blue) to the http.cc code:
    while (strListGetItem(&vary, ',', &item, &ilen, &pos)) {
        SBuf name(item, ilen);
        if (name == asterisk) {
        /*  vstr.clear();            
            break; */ 
            continue;
        }
        name.toLower();

       if (name.cmp("accept", 6) != 0 &&
          name.cmp("user-agent", 10) != 0)
               continue;

        if (!vstr.isEmpty())
            vstr.append(", ", 2);



-- 
Best Regards,

Heiler Bemerguy
Network Manager - CINBESA
55 91 98151-4894/3184-1751

Em 07/10/2016 06:26, Hardik Dangar escreveu:
Hey Alex, 

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 ( https://tools.ietf.org/html/rfc2616#section-13
<https://tools.ietf.org/html/rfc2616>  )

After doing fair bit of research I believe we need to two things, 

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...

I am documenting that here,
https://hardikdangar.github.io/thecacheproject/

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.

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.

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.

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.

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 ?

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.
--------

I just want a better cache support for squid and modern day use cases.

On Thu, Oct 6, 2016 at 11:25 PM, Alex Rousskov
<rousskov at measurement-factory.com <mailto:rousskov at measurement-factory.com>
> wrote:
On 10/06/2016 11:14 AM, Linda A. Walsh wrote:
> Alex Rousskov wrote:
>> We can, but ignoring Vary requires more/different work than adding
>> another refresh_pattern option. Vary is not a refresh mechanism so
>> different code areas need to be modified to ignore (but still forward!)
>> Vary.


>    I can't say for certain, but I'd give it a 75% shot of it being
> used as a forced-refresh pattern

The [ab]use cases do not matter here -- the _code_ handling Vary is very
different from the code handling refresh logic. That difference is
natural and unavoidable because the two protocol mechanisms are very
different, even if they both can be and are used to create the same effect.

Alex.

_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users




_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
<mailto:squid-users at lists.squid-cache.org> 
http://lists.squid-cache.org/listinfo/squid-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 69189 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20161021/a97400aa/attachment-0001.bin>


More information about the squid-users mailing list