advanced-post-cache
advanced-post-cache copied to clipboard
Better match the behaviour of Advanced Post Cache to WP_Query when setting found_posts
advance_post_cache was making the following choice in post_limits_request and posts_request:
- If the $limits part of the query is empty or no_found_rows is set return a count of 0.
We should split this, and return NO_FOUND_ROWS when no_found_rows is set, and return NO_LIMIT when there is no $limit clause, so the post count can be calculated correctly.
Also pulled in some code improvements.
Related: #21