ietf-wg-httpapi / ratelimit-headers

Repository for IETF WG draft ratelimit-headers
Other
42 stars 4 forks source link

Caching interaction #98

Closed mnot closed 2 years ago

mnot commented 2 years ago

As is the ordinary case for HTTP caching ({{?HTTP-CACHING=RFC9111}}), a response with RateLimit fields might be cached and re-used for subsequent requests. A cached response containing RateLimit fields does not modify quota counters but could contain stale information. Clients interested in determining the freshness of the RateLimit fields could rely on fields such as the Date header field and on the time window of a quota policy.

It would be better to say that rate limiting information in what we used to call non-firsthand responses (basically, anything with an Age header) should be ignored.

ioggstream commented 2 years ago

Is the following text ok?

As is the ordinary case for HTTP caching ({{?HTTP-CACHING=RFC9111}}), a response with RateLimit fields might be cached and re-used for subsequent requests. A cached response containing RateLimit fields does not modify quota counters but could contain stale information. Rate limiting information in non-firsthand responses SHOULD be ignored.

mnot commented 2 years ago

Looks good, just a few suggested tweaks:

{{?HTTP-CACHING=RFC9111}} defines how responses can be stored and reused for subsequent requests, including those with RateLimit fields. Because the information in RateLimit fields on a cached response may not be current, they SHOULD be ignored on responses that come from cache (i.e., those with a positive current_age; see {{Section 4.2.3 of HTTP-CACHING}}).