Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KTOR-7104 Fix saving caches with different vary header #4673

Conversation

marychatte
Copy link
Member

Subsystem
Client, Cache

Motivation
KTOR-7104
In the issue it's said:

Cache isn't updated when Vary header for 304 response matches but is not equal to Vary for 200 response (however, it's answering with cached response)

But actually, it shouldn't update the cache as well as it shouldn't respond with cached data because in documentation we can find the next:

The same Vary header value should be used on all responses for a given URL, including 304 Not Modified responses and the "default" response.

@marychatte marychatte self-assigned this Feb 13, 2025
@marychatte marychatte enabled auto-merge (squash) February 14, 2025 12:42
…pdated-when-Vary-header-for-304-response-matches-but-not-equal-to-Vary-for-200-response
@marychatte marychatte merged commit 7808fca into main Feb 14, 2025
13 of 17 checks passed
@marychatte marychatte deleted the marychatte/KTOR-7104-HttpCache-Cache-isn't-updated-when-Vary-header-for-304-response-matches-but-not-equal-to-Vary-for-200-response branch February 14, 2025 13:32
anton-erofeev pushed a commit to anton-erofeev/ktor that referenced this pull request Feb 23, 2025
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.

2 participants