advanced-post-cache icon indicating copy to clipboard operation
advanced-post-cache copied to clipboard

Better match the behaviour of Advanced Post Cache to WP_Query when setting found_posts

Open aidvu opened this issue 4 years ago • 1 comments

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.

aidvu avatar Dec 04 '20 18:12 aidvu

Related: #21

r-a-y avatar Feb 25 '21 22:02 r-a-y