httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marko Asplund <marko.aspl...@ixonos.com>
Subject Re: [users@httpd] Cache configuration advice
Date Fri, 02 May 2008 10:22:53 GMT

On Wed, 30 Apr 2008 18:37:35 Joshua Slive wrote:

> >  As far as I've understood the below setup would not correctly cache
> >  request content when using request parameters (requires Expires header).
> >  What would be the best way to fix this?
>
> See the CacheIgnoreQueryString directive.

So, is the only way to get content for both of the below requests cached
correctly to make the backend system set the Expires header and setting
'CacheIgnoreQueryString Off' in httpd.conf?

/listnews?page=1
/listnews?page=2


> >  How will the Cache-Control and Expires (ExpiresByType) work together?
>
> The Expires* directives also set max-age on Cache-Control.

Yes, I just tested and it appears to do that.

By the way, I noticed that if no expires header is set by the backend system,
Apache sets the header value based on Last-Modified header and the
CacheLastModifiedFactor directive values.
The calculation is described in CacheLastModifiedFactor directive
documentation but the documentation only talks about the expiry date
calculation and doesn't explicitly state that also the Expires header is set by
mod_cache. Since the current wording could be interpreted to refer only to
local cache internal operation it might be helpful to explicitly mention
that the Expires header will be set.

> Using those directives, you are influencing how down-stream caches
> will behave, not the local cache. The local cache would need to see
> those directives coming from the upstream (if I remember correctly).

I just double checked this and if I set s-maxage in Apache it does appear to
make the response cacheable by the local cache.

> You'll want to use the CacheDefaultExpire directive to control the
> local cache. Unfortunately, I don't think it is possible to set
> different expiration times within the same host, since this directive
> can't be placed in <Directory>/<Location> sections.

Yes, I found this out the hard way :(
Any hope of getting this restriction removed some time in the future?


thanks,

marko



---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message