Features Pricing Reviews FAQ
Get Plugin

Per-Post Cache Rules

3 min read

xSpeed Cache lets you change caching for a single post or page without touching your site-wide settings. You can stop a page from being cached, or give it a different cache lifetime, right from the editor.

What this does

Most caching settings apply to your whole site. Per-post cache rules let you override those settings for one specific post or page. xSpeed Cache adds a small panel to the editor called xSpeed Cache · Cache Rules with two controls:

  • Never cache this page — keeps the page out of the cache entirely.
  • Custom cache lifetime — sets how long this page stays cached before xSpeed Cache rebuilds it, in hours.

These rules only affect the single post or page you set them on. Every other page keeps using your global cache settings.

Why use it

Some pages change too often, or are too personalized, to serve from a shared cache. Others are fine to cache but should refresh more or less often than the rest of your site. Per-post rules let you handle those pages individually instead of changing your global settings for everyone.

How to set it up

  1. Open the post or page you want to adjust in the WordPress editor.
  2. Find the xSpeed Cache · Cache Rules box in the editor sidebar.
  3. To stop caching this page, tick Never cache this page.
  4. To change how long the page stays cached, enter a number of hours in the Custom cache lifetime field.
  5. Update or publish the post to save your changes.

Note: The xSpeed Cache · Cache Rules box appears on public post types. Media attachments do not show it.

Settings explained

SettingWhat it doesDefault
Never cache this pageSkips the page cache entirely for this postOff
Custom cache lifetimeOverrides the global cache expiry for this post, in hours (1–720). 0 uses the global setting0

Never cache this page

When this is ticked, xSpeed Cache never serves a cached copy of the page. Every visit builds the page fresh. The editor describes this as useful for highly dynamic pages.

Leave it unticked for normal pages so they get the speed benefit of caching.

Custom cache lifetime

This sets how long this one page stays cached before xSpeed Cache rebuilds it, measured in hours. You can enter any value from 1 to 720 hours (up to 30 days).

Leave it at 0 to use your site’s global cache expiry instead. A value above 0 applies only to this page.

Note: Never cache this page takes priority. If it is ticked, the custom cache lifetime has no effect because the page is never cached.

Best practices

  • Use Never cache this page sparingly, only for pages that truly must be built fresh every time. Uncached pages are slower for visitors.
  • Set a shorter custom lifetime for pages that update often, and a longer one for pages that rarely change.
  • If you are unsure, leave both controls at their defaults and let the page follow your global settings.

FAQ

Does a per-post rule change my global cache settings? No. It only affects the single post or page you set it on. Your global settings stay the same.

What does 0 mean in the Custom cache lifetime field? 0 means “use the global setting.” The page follows your site-wide cache expiry.

Which setting wins if I tick “Never cache” and also set a lifetime? Never cache this page wins. The page is not cached, so the custom lifetime is ignored.

  • Purging the Cache
  • How to Enable Page Cache