rtCamp / nginx-helper

Nginx Helper for WordPress caching, permalinks & efficient file handling in multisite
https://wordpress.org/plugins/nginx-helper/
229 stars 121 forks source link

Add option to purge all pages (and make it default?) #246

Open gabrielcossette opened 4 years ago

gabrielcossette commented 4 years ago

Hi,

I noticed that Nginx Helper doesn't have an option to purge all pages whenever one is updated.

This can be problematic in some setup, even with the default WordPress theme. As there's a menu of the pages at the top, it means that if we update the title of one page, the updated value will be only reflected in the homepage and the updated page, not all the other pages. Same thing for the bottom Recent Posts section (for blog posts). To fix this, we would need to add all existing pages/posts to the Custom URL section, and remember to keep the list updated.

Of course, other cases require to add specific pages to the Custom URL section (e..g, a theme with a "portfolio" page that embeds other custom post type pages).

For all theses situations, a "purge all" option would be very useful. This could even be the default to be on the safe side, and then users who know what they are doing could disable it and enable specific conditions as they see fit.

For comparison, LiteSpeed Cache, which is another popular caching plugin, purges all pages by default.

Let me know what you think, thanks :)