Skip to main content

Exclude Pages from Cache

Updated this week

Some pages contain real-time or personalized content that shouldn't be cached. FlyingPress allows you to exclude such pages by matching simple keywords in the URL.

How it works

Add a keyword that appears in the URL. If any part of the URL contains that keyword, the page will be excluded from caching.

  • ❌ Regular expressions are not supported

  • βœ… Use plain keywords only

  • ⚠️ Adding / will exclude all pages

Examples

Keyword entered

Pages excluded

checkout

/checkout/, /cart/checkout/, /user/checkout-step2

account

/my-account/, /account/settings, /user/account/info

dashboard

/dashboard/, /user/dashboard/analytics

/products/

/products/, /products/blue-shirt, /products/sale/*

order

/order-summary/, /my-account/order-history

Each keyword is matched anywhere in the URL. If you want to exclude all product pages, entering /products/ will exclude:

  • /products/

  • /products/blue-shirt/

  • /products/category/t-shirts/

If you want to exclude only /products/blue-shirt/, try using a more specific keyword like blue-shirt.

Be specific

Avoid common or short keywords like /, page, or post unless you're sure.
Broad matches can unintentionally exclude unrelated pages.

How to exclude only the home page

To exclude just the homepage, use this filter in functions.php:

add_filter('flying_press_is_cacheable', function ($is_cacheable) {
if (is_front_page() || is_home()) {
return false;
}
return $is_cacheable;
});
Did this answer your question?