Search squid archive

Re: Caching problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> > Now here comes one problem: if I watch in the access log of www.foo.de,
> there is _always_ a (control) request from squid server to www.foo.de when
> the browser requests the site (with the http code 304). But I don't want to
> have this control request everytime, I tought squid requests www.foo.de,
> not until it recognize, that the file in its cache has expired!?
> > In order to get rid of the control request I configured some refresh
> rules, e.g. for http:
> > 
> > refresh_pattern ^http: 1440 20% 10080
> 
> cache_peer real.server.example 80 0 no-query no-digest no-netdb-exchange 
> originserver
> 
> That should do it for the ICP queries, and some other potential unwanted 
> ones.

Ok, I tried it out but it doesn't have the effect I want. :-( Here is what I am doing: I go to www.foo.de/pharma.html (squid is the accel for www.foo.de) and the access_log of foo.de shows this:

IP.of.my.Squid - - [17/Oct/2007:14:55:57 +0200] "GET /pharma.html HTTP/1.0" 200 200 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7"
IP.of.my.Squid - - [17/Oct/2007:14:55:57 +0200] "GET /bild.jpg HTTP/1.0" 200 10107 "http://www.foo.de/pharma.html"; "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7"
IP.of.my.Squid - - [17/Oct/2007:14:55:58 +0200] "GET /favicon.ico HTTP/1.0" 404 301 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7"

I get the 200 code, which is fine.

(BTW: Why does this request of favicon,ico appear? Is this an apache configuration thing?)

Now, if I hit "F5" in Browser (with and without deleting the _browser_ cache) the access log shows this:

IP.of.my.Squid - - [17/Oct/2007:14:59:26 +0200] "GET /pharma.html HTTP/1.0" 304 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7"
IP.of.my.Squid - - [17/Oct/2007:14:59:27 +0200] "GET /bild.jpg HTTP/1.0" 304 - "http://www.foo.de/pharma.html"; "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7"

I get the 304 code (which is correct), but I don't want to have this control request. E.g. I want to say that squid "isn't allowed" to look at origin server for 30 min. Squid should consider the file(s) as fresh for 30 min and _after_ this period it should look after the file on origin server.

I hope, it is clear what I mean and want. :-) But how do I achieve that? :-)
As mentioned before, the cache_peer statement you wrote didn't work for that.

Thanks a lot,
Micha

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux