Try both old(9.2) and new cache key generation#12271
Merged
cmcfarlen merged 1 commit intoapache:masterfrom Jun 11, 2025
Merged
Conversation
ezelkow1
approved these changes
Jun 10, 2025
Member
ezelkow1
left a comment
There was a problem hiding this comment.
tested here on 10.0.4 and looked good
cmcfarlen
added a commit
to cmcfarlen/trafficserver
that referenced
this pull request
Jun 11, 2025
(cherry picked from commit 8fbd401)
cmcfarlen
added a commit
that referenced
this pull request
Jun 11, 2025
Contributor
Author
|
This was added to milestone 10.1.0 via #12283 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #11519 was a security related PR that removed support for URL param, but also introduced a change that altered the cache key produced from a URL, even if the URL did not have a param component. While this doesn't affect the cache disk layout or cause the cache to reset, it does cause any objects stored by prior versions of ATS to not be found. This has the same effect as resetting the cache when upgrading to ATS10.
This PR mitigates this by introducing a cache key lookup compatibility option. If this option is set, then when ATS encounters a cache miss, it will retry the lookup using the prior versions URL cachekey algorithm. If it then gets a hit, it increments a metric and then proceeds as if the first attempt was found. If it still gets a miss, the transaction will continue on as a miss. In this mode, cache writes will always use the new algorithm and so over time, the need for having this mode enabled goes away.
This route was chosen over reverting the PR because of the security nature of the change and it could be a strategy for future releases to be able to make similar changes to cache and offer a backward compatibility mode for lookups that can be used until the cache wraps.