Conversation
…nd their indexables
|
Tested, confirmed to limit the amount of IDs that are cached. ✅ I have tested this with core WordPress pages, as well as a custom hierarchical posttype. I switched around the amount of posts per page and confirmed that that the IDs of the posts that are shown on the admin page are the same as the IDs that are fed into the caching function. This may still hurt performance a bit if the limit is set to 100 and all 100 posts need to be indexed, but that is only once, hopefully. @herregroen one question about a theoretical situation; if there is a plugin that causes the main query to gather a lot of post IDs and there are not hierarchical, we could theoretically run into the same issue. Should we therefore introduce a hard limit on the amount of posts that can be cached by this function? We know WordPress core does not allow more than 100 posts per page, so maybe always only feed the first 100 post IDs to the cache? |
|
@Djennez If that plugin does so in the same way that the page overview does then we'll work together seamlessly as it's not based on the post type being hierarchical but rather the data-structure. If that plugin is fetching full post objects then our caching won't make a difference as the main issue is the post_content being fetched and we only fetch that ourselves if the data structure is as used by hierarchical post types. |
|
Acceptance test: ✅ |
…nd their indexables
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
@inheritDoccomments not having short descriptions should not be warnings.Test instructions
This PR can be tested by following these steps:
UI changes
Documentation
Quality assurance
Fixes https://yoast.atlassian.net/browse/QAK-2234
Fixes #16027