Skip to content

Honor cache control directives for timestamp cache#362

Merged
SimonCropp merged 2 commits intomainfrom
Honor-Cache-Control-directives-for-timestamp-cache
Mar 11, 2026
Merged

Honor cache control directives for timestamp cache#362
SimonCropp merged 2 commits intomainfrom
Honor-Cache-Control-directives-for-timestamp-cache

Conversation

@SimonCropp
Copy link
Owner

No description provided.

Respect Cache-Control when serving cached timestamps: skip cache on "no-cache", use the request Cache-Control values when parsing staleness, and compute elapsed time earlier for accurate comparisons. Add helpers HasDirective and TryParseDirectiveValue to inspect StringValues for directives (e.g. min-fresh) and ensure min-fresh + elapsed does not exceed max-age before returning a cached timestamp. Minor refactor to improve clarity and correctness of cache validation.
@SimonCropp SimonCropp added this to the 8.1.0 milestone Mar 11, 2026
@SimonCropp SimonCropp merged commit f0d603c into main Mar 11, 2026
5 checks passed
@SimonCropp SimonCropp deleted the Honor-Cache-Control-directives-for-timestamp-cache branch March 11, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant