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
perf: store donation meta data results under correct cache key #3359
Comments
@ravinderk Please complete the issue template so we can understand how this affects the user. It's unclear whether this affects front end or back end performance, or both. Every issue also needs acceptance criteria. |
@kevinwhoffman This was an old issue which I created. I added few lines to remind myself. I will update this by tomorrow |
@kevinwhoffman I changed the title and scope of this issue. We will fix |
perf: store donation meta data results under correct cache key #3359
Bug Report
User Story
As an admin, I want my website to load faster, but currently, I am seeing additional meta queries on each page load ( Query Monitor ).
ref: https://secure.helpscout.net/conversation/759921560/0/?folderId=672194
Current Behavior
We are using
WP_Query
to get donations or form then by default WordPress loads metadata of each donation to cache withinpost_meta
key.https://github.com/WordPress/WordPress/blob/32ee2ed5734357d5faa5537d9916ada07f672eaf/wp-includes/meta.php#L888
We have custom meta table for donation and form, so whenever we do meta query then we define
meta_type
and it is used to search meta query result in cache. We always get cache miss because cache always store underpost_meta
key instead ofdonation_meta
https://github.com/WordPress/WordPress/blob/32ee2ed5734357d5faa5537d9916ada07f672eaf/wp-includes/meta.php#L520
We can reduce a lot of query by storing meta cache under correct cache key.
Acceptance Criteria
donation_meta
if meta type isdonation
The text was updated successfully, but these errors were encountered: