RunCloud Hub is a WordPress plugin that allows you to manage and optimize your website performance using nginx page caching.

Although it can significantly improve your website speed, there may be some pages on your website that you don’t want to cache, such as dynamic pages that change frequently, pages that require user input – such as logins, shopping cart, checkout, or account pages.

Let’s see how to exclude these pages from caching.

In RunCloud Hub settings, you can fine-tune your page caching strategy and ensure that only the pages that need to be cached actually are. This will help you optimize your website performance and user experience.

The RunCache Rules settings allow you to specify various criteria to exclude pages from caching based on a matching URL path, cookie name, browser user-agent, visitor IP address, or query string. You can also ignore or allow certain query strings to cache pages with different parameters.

To access the RunCache Rules settings, follow these steps:

  • Log in to your WordPress dashboard and go to RunCloud Hub > RunCache. You can use RunCloud Hub’s built-in login feature for this.
  • Scroll down to the RunCache Rules section. You will see four tabs: Cache Exclusion Settings, Cache Query String Settings, Cache Preload Settings, and Cache Purge Settings. Click inside the text box that corresponds to the criteria you want to use to exclude pages from caching.
  • Enter the values for the criteria you want to use – one per line. For example, if you want to exclude pages with /login/ in the URL path, enter /login/ in the Cache Exclusion Settings tab. If you want to exclude pages with utm_source in the query string, enter utm_source in the Cache Query String Settings tab.
  • Click on the Save Changes button at the bottom of the page.

Note: You can use regular expressions (regex) to match multiple values with a single pattern. For example, if you want to exclude all pages that start with /wp-admin/, you can enter /wp-admin/.* in the Cache Exclusion Settings tab.

RunCloud Hub Caching in WooCommerce

By default, RunCloud Hub is designed to skip its cache automatically when it detects certain WooCommerce cookies. This feature prevents customers from seeing outdated cart information and ensures their shopping experience is accurate. This includes WordPress cookies like woocommerce_cart_hash and wp_woocommerce_session_*.

For example, if a customer adds an item to their cart, WooCommerce creates cookies. RunCloud Hub sees these cookies and, for that specific user, all pages will then show x-runcloud-cache: BYPASS.

You should also note that WooCommerce itself often starts a session even when a user is just viewing a single product page, before anything is added to the cart. This is a known quirk in which WooCommerce (or a plugin) might initialize a session cookie simply by loading a product page. As RunCloud Hub looks for these session cookies, the product page can bypass the cache even if the customer hasn’t interacted with the cart yet.

If you need any further assistance or guidance on excluding pages from caching in RunCloud Hub, please feel free to contact our support team or join our community forum. We are always happy to help you make the most of RunCloud Hub.