tillkruss / Nginx-FastCGI-Cache

A WordPress plugin that purges Nginx cache zones.
48 stars 25 forks source link

Allow post types to be excluded from triggering a cache purge #8

Closed A5hleyRich closed 7 years ago

A5hleyRich commented 7 years ago

In some situations it would be useful to exclude certain post types from triggering a cache purge. For example, WooCommerce uses the shop_order post type and we don't want the front-end of the site to be purged when new orders are created.

add_filter( 'nginx_cache_excluded_post_types', function() {
    return array( 'shop_order' );
} );
polevaultweb commented 7 years ago

Awesome @A5hleyRich - much needed!

polevaultweb commented 7 years ago

@tillkruss any news on a plugin update for this?