Search squid archive

Re: Do not make conditional requests to the originserver when cache hits. Is it possible?

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

 



Kai-Chieh Ku wrote:
Hello,

I just setup a reverse proxy. But I noticed squid always send
conditional requests to the backend server even its local cache
contains the fresh data. The response headers looks like this:
--
HTTP/1.0 200 OK
Last-Modified: Wed, 17 03 2010 08:26:15 GMT
Cache-Control: max-age=86400
Content-Type: text/plain
X-Cache: MISS from ku-office
X-Cache-Lookup: HIT from ku-office:81
Via: 1.0 ku-office:81 (squid/2.7.STABLE8)
Connection: close
--
The backend server listened on port 80 and squid listened on port 81.

And my settings of squid are:
--
http_port 81 vport=80 defaultsite=localhost
cache_peer 127.0.0.1 parent 80 0 no-query no-digest originserver
refresh_pattern .		0	20%	4320
--

I'd like to let squid make the conditional request only when the cache
entry is expired. What am I missing?

... very twisted.

You have squid listening on pot 81 for requests to http://localhost:80/something

Take a read through this:
http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator


As for the backend queries, you show no evidence that they are happening at all. The reply you show has bee updated with current origin info. there is no sign of what it was when squid received the client request. check access.log for TCP_HIT (exactly), these are true cache hits. The others all needed to be updated due to data aging out.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE8 or 3.0.STABLE25
  Current Beta Squid 3.1.0.18

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

  Powered by Linux