-
-
Notifications
You must be signed in to change notification settings - Fork 660
Query unaware interceptors cache fix #4240
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
Query unaware interceptors cache fix #4240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
lib/util/cache.js
Outdated
} else if (value !== undefined && value !== null) { | ||
params.append(key, String(value)) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we don't have this already serialized somewhere? We might be wasting some resources. Also, I would prefer if we used the previous logic so we are sure the actual result is identical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! Looks like we already have a util function to handle serialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This relates to...
Addresses #4209 (interceptors.cache is not aware of query)
Changes
makeCacheKey
function to include query parameters in cache key generation.Features
N/A
Bug Fixes
Fixed cache interceptor to properly handle query parameters in cache keys, preventing incorrect cache hits when requests have different query parameters.
Breaking Changes and Deprecations
N/A
Status