emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58895: closed (GNU ELPA: Stale badges in GitHub cache)


From: GNU bug Tracking System
Subject: bug#58895: closed (GNU ELPA: Stale badges in GitHub cache)
Date: Sun, 30 Oct 2022 15:47:02 +0000

Your message dated Sun, 30 Oct 2022 08:46:14 -0700
with message-id 
<CADwFkmk4kubnt+k9XSKu+LLQCj_iqz_WYZ9TFeg1BT0yXJHRLQ@mail.gmail.com>
and subject line Re: bug#58895: GNU ELPA: Stale badges in GitHub cache
has caused the debbugs.gnu.org bug report #58895,
regarding GNU ELPA: Stale badges in GitHub cache
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
58895: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58895
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: GNU ELPA: Stale badges in GitHub cache Date: Sun, 30 Oct 2022 07:59:42 -0700
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#58895: GNU ELPA: Stale badges in GitHub cache Date: Sun, 30 Oct 2022 08:46:14 -0700
Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Hmm... we had a directive for that in Apache's config, but it wasn't
> quite right.  It should be working now.
> It uses slightly different settings.
> You said "12 hours", your code sais 6 hours, and the code we had used
> 24 hours.  I kept the 24 hours.

Sounds good, thanks.

> Your code said "must-revalidate", the code we had (and still have)
> said/says "public".  I think public is right, but I don't really know
> what "must-revalidate" (or its lack) implies.

>From reading the docs, "public" should be fine.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]