Not all caches are cleared for post type when updating a post
-
I’m having some issues with caches being cleared when I expect and I think I’ve found why, it looks like in the following scenario:
- I make a request to /wp/v2/posts, which returns 10 posts, and these 10 posts are all recorded in the DB in the wrc_relations table
- If one of those 10 posts is edited the cache for /wp/v2/posts is cleared
- If a new post is created the cache for /wp/v2/posts is cleared
- If I update what is essentially post #11 /wp/v2/posts is not cleared – is this correct?
If that final point is correct it seems like this could cause some issues since I might have made a change that would cause post #11 to replace one of the 10 initially cached, e.g. I could change the publish date.
I had assume that creating or editing any post would clear all caches for that post type… Assume you’ve not done that for performance reasons but wondering what you think about this scenario…?
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Not all caches are cleared for post type when updating a post’ is closed to new replies.