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

Cache the post mapping version #2445

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

felipeelia
Copy link
Member

Description of the Change

This PR caches the detected Posts mapping version for a day. This way, we don't send get_mapping calls on every request but we are still able to detect if the ES server was upgraded in a timely manner. People wanting to change that period can do that via the new ep_post_mapping_version_cache_expiration filter.

Applicable Issues

Closes #2432

Changelog Entry

Changed: Cache the detect posts mapping version, avoiding get_mapping calls in all admin requests.

@felipeelia felipeelia added this to the 4.0.0 milestone Nov 5, 2021
@felipeelia felipeelia self-assigned this Nov 5, 2021
Copy link
Contributor

@oscarssanchez oscarssanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mckdemps mckdemps modified the milestones: 4.0.0, 3.6.5 Nov 9, 2021
@felipeelia felipeelia merged commit aaa302f into develop Nov 11, 2021
@felipeelia felipeelia deleted the feature/cache-post-mapping-version branch November 11, 2021 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: as an admin user, every page load in the dashboard results in a "get mapping" call
3 participants