HomePhabricator

Do not cache HTML of pages that are expected to change

Description

Do not cache HTML of pages that are expected to change

Summary:
By default, we should assume HTML pages are going to have information updated
regularly (most notably, new release versions), especially as we apply more automation.
This fixes an issue where a user who recently looked at the homepage or releases page
will see the old version when revisiting the site after a new release becomes available.

CSS/JS and other assets are unaffected by this change.

Pages under /doc/ are not affected by this change and may be cached, since many of these
pages are versioned and unlikely to change.

Test Plan:

docker build -t bitcoin-abc-org .
docker run -it -p 8080:80 bitcoin-abc-org

Verify Cache-Control: no-cache header for the following pages:

  • /
  • /releases/

Verify Cache-Control is not set for the following pages (note that in prod, a default
cache duration will be applied):

  • /doc/
  • /doc/release-notes/release-notes-0.22.3.html

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7770

Details

Provenance
jasonbcoxAuthored on Oct 5 2020, 17:30
jasonbcoxPushed on Oct 5 2020, 21:07
Reviewer
Restricted Project
Differential Revision
D7770: Do not cache HTML of pages that are expected to change
Parents
rABCWEBce1e353fd0bf: Fix 0.22.3 manpages not appearing in the doc index
Branches
Unknown
Tags
Unknown