purgely icon indicating copy to clipboard operation
purgely copied to clipboard

Adding new Post does not purge other existing Posts

Open a2cf opened this issue 9 years ago • 1 comments

Purgely doesn't purge other existing cached posts when adding new post. In most cases, each post have link to other posts so it will cause no link to new post from existing posts. Can we add an option to purge all existing posts when adding new post?

a2cf avatar Jun 10 '16 07:06 a2cf

Hi @a2cf!

I am not a huge fan of doing so as a default or even as an option due to the dangers of doing so. Purging all posts when a new post is published is quite dangerous and usually is not recommended.

That does not prevent you from doing so manually. You could do something like this (untested):

add_action( 'save_post', 'purgely_purge_all' );

Just note that I do not recommend this at all. I would highly recommend looking into your caching structure and seeing if you can get around doing this as it can easily destabilize your site.

tollmanz avatar Jun 15 '16 17:06 tollmanz