[RFC/Loggerhead] Set /static/ pages to expire in 1 week

Michael Hudson michael.hudson at canonical.com
Wed Aug 27 22:54:53 BST 2008


Matt Nordhoff wrote:
> Hi,
> 
> This trivial patch sets the Expires and Cache-Control headers on
> /static/ pages to 1 week. It's an "RFC" instead of a "MERGE" due to the
> issues below.

Thanks.

> Potential issues:
> 
>  * I don't know if 1 week is the best value. Personally, I'd prefer to
> have the images expire in 1 month, since they change so infrequently,
> but I'd also like to make sure the CSS and JS are more fresh than that.
>
>  * It's not configurable. I don't know why, but it's possible that
> someone would want to change it, and the only way to do so is by hacking
> on the code.
> 
>  * I don't know when the cache_max_age argument was added to
> paste.urlparser.make_static(), so it might break backwards compatibility
> or something. It works in Paste 1.4, so I guess that's old enough?

Another approach would be to serve from/generate urls like
/static$revno/ and then set "Expires: never" or however it's spelt.  Do
you think that would make more sense?

Cheers,
mwh



More information about the bazaar mailing list