Hello @wamwebdev
Thank you for reaching out and I am happy to help!
Just to confirm, you are asking for the specific CPT when updated/edited to be purged from the cache and not purge the entire Page Cache?
Can you please try adding it to Performance>Page Cache>Purge Policy>Additional pages: section and let me know if this helps!
Thanks!
Hi,
Yes. So for a given CPT, e.g. /events/, the goal would be to only purge the cache of the post being edited, e.g. /events/my-event-post/. I have several CPTs active on the site with many posts for each, so manually adding the post URLs to the Purge Policy would not be feasible. But is there a way to use a wildcard?
The majority of our post updates are about the content of the post, not the key details like title, dates or featured image. So purging an archive sometimes makes sense as well, but it usually isn’t necessary. Purging the whole site cache seems excessive for a single small update.
Regards
Hello @wamwebdev
Thank you for your feedback and sorry for the late reply.
Have you tried adding /events/* to Performance>Page Cache>Purge Policy>Additional pages: section
Let me know if this helps!
Thanks!
Hi – Sorry – I’ve been out of the office.
Thanks for the update. So I’m trying to understand the logic of this. If I include /events/* in the “Additional pages” field, with no other settings checked, does that mean that any update to any page or any other CPT post will cause a purge of all posts under /events/ ? Or would the purge only happen when an event post is updated?
Hello,
I’ve finally got around to testing this properly. Adding /my_custom_post_type/* into the Purge Policy>Additional pages field does not cause all posts of that CPT to be purged when one is updated. Is that the expected behavior?
Regards