> Anyway- looking at the log lines he sent later, perhaps this gives a clue:

Very clever. I can't believe I missed this. 

> Maybe this hostname is confusing mod_cache somehow.  The fact that it is 
> caching the URL, but then doesn't serve from cache because nobody thinks they 
> have it tells me it could be a weird naming issue.

The cache storage key is computed partly based on the return of 
ap_get_server_name which normally (unless UseCanonicalName DNS) will return 
either r->hostname or r->server->server_hostname (where r is the request_rec 
structure). Should the return value of ap_get_server_name be different at the 
time mod_cache determines whether there is an appropriate response, compared to 
the time at which the response is stored, the lookup would be made using a 
different key than the one under which the response would be stored, and hence 
the response would never be served from cache despite being stored in the cache.

Problem is that I have not found any good reason why the values of r->hostname 
or r->server->server_hostname should change during request processing. But I'll 
leave this excercise to someone who knows Apache internals well.

What I can suggest however, is to try to issue a request for the same URL using 
a browser that sets a Host header in the request (force HTTP 1.1 ??). The above 
warning is issued only when the request does not contain a host header. I tried 
to request 
http://media.rightmove.co.uk/14k/13115/13115_418671A_18671_IMG_00_t.JPG myself, 
but it appears to be served by "Server: Apache/1.3.29 (Unix)"

-ascs

-----Original Message-----
From: Nathan Seven [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 31, 2006 7:21 PM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] Reverse Proxy Cache not Caching in 2.2.2

Yes- my mind choked and read "2.2" instead of "2.2.2"-

Anyway- looking at the log lines he sent later, perhaps this gives a
clue:

 > [Tue May 30 11:29:34 2006] [warn] [client 10.6.3.3] proxy: no HTTP
0.9 request (with no host line) on incoming request and preserve host set 
forcing hostname to be media.rightmove.co.uk for uri /14k/ 
13115/13115_418671A_18671_IMG_00_t.JPG

Maybe this hostname is confusing mod_cache somehow.  The fact that it is 
caching the URL, but then doesn't serve from cache because nobody thinks they 
have it tells me it could be a weird naming issue.

Anyway- there are other reasons that the response may not get cached, depending 
on the headers in the response and what you have things like 
CacheIgnoreCacheControl and CacheIgnoreNoLastMod etc-

http://httpd.apache.org/docs/2.2/mod/mod_cache.html

-SS

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to