SIGN IN SIGN UP

Improve caching logic for http.send (#5316)

In order to calculate if a cached entry expired or not, we would previously
read the headers stored with the request, and parse each of the relevant date-related
ones and use those to compare with the current time. #4960 improved this by allowing
us to ignore the Date header completely when force_cache is enabled.

We now go one step further, and calculate and store an expiresAt value at the time the
entry is created. This allows for a much simpler check of expiry, and avoids re-parsing
the header values with each lookup.

Fixes #5300

Signed-off-by: Anders Eknert <anders@eknert.com>
A
Anders Eknert committed
1c8ac422e06a4bd523549b08306687483125089d
Parent: 51f9acb
Committed by GitHub <noreply@github.com> on 10/27/2022, 9:33:15 AM