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

Use only the body to build the cache key #3438

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

felipeelia
Copy link
Member

Description of the Change

Since we've introduced the Request ID header, autosuggest won't cache the authenticated request anymore, as we were using the entire request (including headers) to create the cache key. This PR changes that to use just the query body.

How to test the Change

  1. Set external object cache
  2. Load a page, see the _search request for autosuggest
  3. Reload the page, the authenticated request should have 0ms

Changelog Entry

Fixed - Authenticated requests for autosuggest were not being properly cached while using external object cache.

Credits

Props @felipeelia

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@felipeelia felipeelia added this to the 4.5.2 milestone Apr 12, 2023
@felipeelia felipeelia merged commit 90359be into develop Apr 14, 2023
@felipeelia felipeelia deleted the fix/autosuggest-requests branch April 14, 2023 13:30
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