Skip to main content

How to Use Breeze Advanced Rules to Exclude URLs, Cache Query Strings, and Purge Cache

Learn how to exclude URLs from Breeze cache, cache query strings, and clear cache with the Breeze REST API on Cloudways. Simple steps for WordPress users.

Written by Syed Abuzar Mehdi

Some pages on your site change often and should always show fresh content. The Advanced Options tab in Breeze lets you control which pages are cached and which are not.

In this article, you will learn how to exclude URLs from cache, cache pages with query strings, and clear the cache with the Breeze REST API. You will also find answers to common questions about WooCommerce, search pages, and settings access.

Note: This guide is for WordPress sites on Cloudways that use the Breeze plugin.


How to Exclude a URL from Breeze Cache

The Never Cache These URLs field stops chosen pages from being cached. Use it for pages that must always show fresh data, such as a custom landing page or a store section.

  • Log in to your WordPress Dashboard.

  • Go to Settings > Breeze.

  • Click the Advanced Options tab.

  • In Never Cache These URLs, add one URL or pattern per line.

  • Click Save Changes, then purge the cache.

To exclude a group of pages, use a wildcard. A wildcard is a symbol that stands for any text. In this example, (.*) matches every page that starts with that address:

https://yourdomain.com/shop/category-1(.*)

How to confirm it works:

  • Open the excluded page.

  • Right-click and choose View Page Source.

  • Confirm that there is no Breeze cache tag in the code.

Does Breeze Exclude WooCommerce Pages Automatically?

Yes. The Cart, Checkout, and My Account pages are excluded from cache automatically. You do not need to add them to Never Cache These URLs.

Important:

If one of these pages still shows cached content, check whether you use a custom page builder or a non-standard WooCommerce page template. Breeze finds these pages by using the default WooCommerce page structure.


How to Cache Pages with Query Strings

A query string is the part of a web address after a question mark, such as ?country=RO. By default, Breeze does not cache these addresses, because they usually show changing content.

The Cache Query Strings field lets you choose which parameters Breeze should cache. A parameter is one named item in a query string, such as country.

  • Go to Settings > Breeze > Advanced Options.

  • Under Cache Query Strings, add the parameter names you want to cache, one per line.

  • Click Save Changes, then purge the cache.

Example: You add country and tester to the list.

  • ?country=RO&tester=Mike is cached.

  • ?country=RO&tester=Mike_testing gets its own cached copy, because the value of tester changed.

  • ?utm_source=google&country=RO is cached based on country=RO only. Breeze ignores utm_source because it is not in your list.


How to Purge Breeze Cache with the REST API

A REST API lets another program send a request to your site. Breeze has one REST endpoint that clears the whole cache. It cannot purge a single URL.

Step #1 - Turn On the Breeze API:

  • Go to Settings > Breeze > Advanced Options.

  • Turn on Breeze API.

  • Copy the Authentication Token. It must have at least 16 characters. Click the refresh icon to create a new one.

  • Click Save Changes.

Important:
​The route works only while Breeze API is on. If it is off, the URL returns a 404 error.

Step #2 - Send the Request:

Send a POST request to this address:

https://yoursite.com/wp-json/breeze/v1/clear-all-cache

Add your token in the Authorization header as Bearer followed by the token. No request body is needed.

curl -X POST "https://yoursite.com/wp-json/breeze/v1/clear-all-cache" \ -H "Authorization: Bearer YOUR_TOKEN_HERE"

A successful request returns HTTP 200 with this message:

{ "message": "Cache Cleared" }

What It Clears

This request runs the same action as Purge All Cache in the admin bar:

  • Breeze page cache

  • Minified CSS and JavaScript cache

  • Varnish, when it is on

  • Cloudflare, when Cloudways Cloudflare is on

  • WordPress object cache

Error Codes

  • 401: The token is missing, shorter than 16 characters, or does not match the saved token.

  • 429: There were more than 5 failed attempts from the same IP address in one minute.

  • 404: Breeze API is turned off, or the URL is wrong.


Frequently Asked Questions

Does Breeze cache WordPress search result pages?

No. Breeze excludes search pages automatically. This covers both ?s=keyword and pretty search URLs such as /search/keyword/. Search pages are handled like 404 pages and password-protected pages: the visitor gets the page, but no cache file is saved.

Adding s to Cache Query Strings does not turn on search caching.

Can I choose which user roles can change Breeze settings?

No. Only users who can manage WordPress options can open and save Breeze settings. By default, this is the Administrator. Other users get a 403 (access denied) error.

The role switches under Basic Options > Cache Logged-in Users do something different. They decide whether Breeze caches pages for users of that role. They do not control who can edit the plugin.

Note:
​Editors can use Purge All Cache in the admin bar, but they cannot open Breeze settings.

Can I set extra URLs to purge when a specific page is purged?

No. Breeze has no setting for linked purge rules. When you update a post, page, or custom post type, Breeze automatically purges a fixed set of related pages. This includes the item itself, the homepage, the author archive, its categories and tags, public taxonomy archives, the site feeds, and related REST URLs. You cannot add your own URLs to this list.


That’s it! We hope this article was helpful.

Did this answer your question?