bluehost / endurance-page-cache

Other
24 stars 11 forks source link

Don't send purge requests for non-public post statuses #65

Closed earnjam closed 5 years ago

earnjam commented 5 years ago

We currently send purge requests on all save_post calls for public post types.

We don't need to send them for posts with a status that is not public and is staying the same or transitioning to another non-public status, as there shouldn't be any public content changing that would need purging.

earnjam commented 5 years ago

Making this draft for now, as I realized we'd need to account for both the before and after post status change. If a post was previously draft, but going public, then we'd want to purge the homepage or the blog page.

The only time we should prevent the purge is when a post is remaining non-public both before and after a save.

earnjam commented 5 years ago

Closing this in favor of #67, which does this and more.