zakkymuha / lusca-cache

Automatically exported from code.google.com/p/lusca-cache
0 stars 0 forks source link

PATCH improvement for web acceleration hosts #119

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have written this patch for squid 2.7 to handle user requests much more 
efficiently.

The patch does the following:

1. Normalize the accept-encoding header "gzip    " -> "gzip" so you get 
efficient caching.
2. Removes request cache-control header, who cares what the client wants, 
server knows best ;-)
3. Remove cookies from mime types that fall under  image, audio and video. 

See site for patch.

http://letsgetdugg.com/2009/12/06/squid-headers-normalization-patch/

Original issue reported on code.google.com by victori...@gmail.com on 27 Jul 2010 at 1:58

GoogleCodeExporter commented 9 years ago
1. Removes Cache-Control request headers, don’t let clients by-pass cache if 
it is primed.

example.com with Cache-Control: no-store, no-cache, must-revalidate

@refresh_pattern we set : 

refresh_pattern example\.com.*\. 129600 100% 129600 ignore-no-cache 
ignore-no-store ignore-must-revalidate

question : with u'r patch, does it mean all setup example.com @refresh_pattern 
will be failed, and it back to normal cache-control (Cache-Control: no-store, 
no-cache, must-revalidate)

or these are two different things and have nothing to do

Original comment by hends...@gmail.com on 27 Jul 2010 at 5:31

GoogleCodeExporter commented 9 years ago
#1 was something I did not even want to think about, this is what I expect http 
accelerators to do by *default* The patch is opinionated. The same goes for #3 
I expect large cacheable files to not have cookies defined. Basically #1 and #3 
are sane defaults for a http accelerator. #2 (http header normalization) should 
of been in the squid core from the beginning, who in their right mind wants to 
cache "gzip " and "gzip" responses. Just my two cents.

Original comment by victori...@gmail.com on 27 Jul 2010 at 5:38