Page MenuHomePhabricator

Do not cache HTML of pages that are expected to change
ClosedPublic

Authored by jasonbcox on Oct 5 2020, 17:39.

Details

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

Diff Detail

Repository
rABCWEB Bitcoin ABC Website
Lint
Lint Not Applicable
Unit
Tests Not Applicable