httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [users@httpd] mod_disk_cache and caching same content for all users
Date Wed, 26 Aug 2009 20:37:28 GMT
Nick Kew wrote:
> Henry wrote:
>> Correct me if I'm wrong, but there doesn't seem to be much point in 
>> mod_disk_cache if it's not caching for all across the board.
> It's cacheing what is cacheable!  It can cache contents with a
> Vary, but it can't serve from the cache to a different agent.
> Get rid of that Vary header, and it'll do what you appear to be asking.

Hi Henry.

What the eminent gurus Eric and Nick are trying to tell you, in a way 
that is certainly evident to them but maybe not to you, is that it is 
not Apache that is creating that HTTP response header "Vary".

It is your PHP script/application which does that.

Apache is merely passing it on to the browser, and, on the way there, it 
is caught by mod_cache and examined.
When mod_cache sees this header, it is thinking "Hum.. this response is 
going to be different depending on the browser, so I'd better remember 
that". So it does, and when another browser, with even a slightly 
different "User-agent" request header wants the same page, it won't 
match what mod_cache has in its cache, and you'll get a new response, 
which in turn will be cached with a parameter remembering this last 

So, again as they said, change your PHP application/script so that it 
will not add this "Vary" header to the response, and the symptom will 
magically disappear.

That's what I'm guessing anyway..

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message