GNU bug report logs -
#58895
GNU ELPA: Stale badges in GitHub cache
Previous Next
Full log
View this message in rfc822 format
Severity: minor
I often see stale badges in the GitHub cache, sometimes for several
days. I think we should use a "Cache-Control" header when serving them:
$ curl -i https://elpa.gnu.org/packages/url-scgi.svg
HTTP/1.1 200 OK
Date: Sun, 30 Oct 2022 14:45:24 GMT
Server: Apache/2.4.54 (Debian)
Last-Modified: Sat, 29 Oct 2022 21:04:31 GMT
ETag: "4c2-5ec32b879e704"
Accept-Ranges: bytes
Content-Length: 1218
Content-Type: image/svg+xml
[...]
Here, we should also have:
Cache-Control: max-age=21600, must-revalidate
This should ensure that they are only ever cached for 12 hours, which
roughly coincides with how often we update the archive.
Probably something like this in .htaccess should suffice:
<FilesMatch ".+\.svg$">
Header unset Cache-Control
Header set Cache-Control "max-age=21600, must-revalidate"
</FilesMatch>
For more, see:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
https://httpd.apache.org/docs/2.4/mod/core.html#filesmatch
This bug report was last modified 2 years and 206 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.