echidna icon indicating copy to clipboard operation
echidna copied to clipboard

Caching headers for dated specifications

Open deniak opened this issue 10 years ago • 1 comments

The caching headers for the dated specs are currently set for 1 year:

denis@krave ~% curl -I http://www.w3.org/TR/2015/WD-SRI-20150505/
Last-Modified: Tue, 05 May 2015 14:26:33 GMT
Cache-Control: max-age=31536000
Expires: Fri, 06 May 2016 05:22:10 GMT

Now people can publish multiple times a day, these headers should be set only if the date is over

deniak avatar May 07 '15 05:05 deniak

@deniak, I am not so sure we should do this as it might complexify our apache config, but nevertheless that seem possible using Expressions in Apache:

# Disable caching if document was published today
# (to enable publication of new revisions on teh same day)
<If "%{REQUEST_URI} =~ ^/TR/%{TIME_YEAR}/.+-{%TIME_YEAR}{%TIME_MONTH}{%TIME_DAY}/">
  ExpiresActive Off
</If>

Or if we don't want to fully disable caching for those URIs it could be set to a shorter value (eg 1hour).

ExpiresDefault "access plus 1 hour"

vivienlacourba avatar Oct 04 '18 12:10 vivienlacourba