Fix overly-aggressive caching when a Max-Age is not stored.
Review Request #13053 — Created May 17, 2023 and submitted
Before initiating a request, RBTools checks if the cache contains an
entry expected to be up-to-date. This compares the value inExpires
or
Cache-Control: max-age=...
to the local time, and if it's too old, the
caller is free to make the request.The problem is that this code had a bad default in the case where no
max-age
was stored. If it wasNone
, this function defaulted to
"up-to-date", preventing requests from going through.This breaks with Review Board 6, because the headers being sent in the
API no longer include anExpires
orCache-Control
by default,
causing aNone
value to be stored, and triggering the broken behavior.Due to this, users will need to upgrade to RBTools 4.1 or higher for
Review Board 6, in order to avoid caching issues.
Unit tests pass.
Verified this fixed the caching bugs discovered since improving caching
behavior in Review Board 6.
Summary | ID |
---|---|
85bf380189d4bf2eff1439833cb03c4b5d762cf1 |