Skip to content

Manage the Website Response Cache

TMXIO places an NGINX response cache in front of every hosted dynamic Website runtime. WordPress and generic PHP use FastCGI caching; Node.js uses proxy caching. Static HTML is already served directly by NGINX and therefore has no separate response-cache screen.

The response cache stores public, cache-eligible responses. Authenticated requests, private or no-store responses, unsafe methods, and application bypass signals are sent to the Website origin.

  1. Open a hosted Website.
  2. Select the Website Environment you want to manage.
  3. Open Cache in the Website navigation.

WordPress and generic PHP environments open on what the cache is doing: the share of cacheable requests served from cache, and PHP requests at once with and without the cache. Below that, How a request is decided lists the checks a request passes in the order the node applies them, and Check a page shows which check decides for a given address. Mode, freshness and rules follow, each section with its own Save changes, beside Recent clears and Policy history. Node.js environments show Clear cache and Recent clears. The selected Environment is always the boundary; changing or clearing one Environment does not affect another.

Changes to mode or rules are applied in stages, and a stage that fails leaves the Environment with Caching is paused: pages are served correctly from the Website origin and nothing is cached. The mode you had chosen is kept. Fix the reported problem and save again, from either section; once every stage succeeds, caching resumes in that mode. Choosing a different mode replaces it.

If the notice says the mode in effect before the change was not recorded, saving rules alone is refused. Choose a mode under Mode and freshness and select Save changes, even if it is the mode already shown, to resume.

A generic PHP application owns its own freshness, so its cache rules cannot use cookies or override freshness, and saving such a rule is refused. If an Environment still holds one from before, TMXIO bypasses that Environment’s cache rather than serve the other rules without it: pages come from the application and nothing is cached. The Environment’s Deploys page shows the deployment policy warning until the rule is removed, and caching resumes on the next save.

When a Node.js release declares too much freshness

Section titled “When a Node.js release declares too much freshness”

A Node.js application decides how long its responses stay fresh through its own Cache-Control headers, within the limits of the environment’s edge cache policy: 604800 seconds of shared freshness, 300 seconds of stale-while-revalidate and 3600 seconds of stale-if-error unless the policy sets lower ones. Each deploy checks the home page, up to eight Freshness check paths you list under the policy’s advanced settings, and a sample of the release’s prerendered Next.js pages against those limits. List a few routes that set their own Cache-Control, such as a blog post or a tag page, so the check covers more than the home page for any framework. When you turn caching on, or change a limit or the path list, the release that is already running is checked the same way before anything is cached. If the check cannot reach the application, nothing is cached and the check is retried until it gets an answer.

When a page declares more, for example the Next.js default s-maxage=31536000, and the application answers a short burst of uncached requests quickly and without errors, the release stays live and nothing is cached for that environment until a release within the limits is deployed, or the limits are changed so that the running release is within them. The deploy shows Succeeded with warnings, owners are alerted, and the policy you saved is not changed. If the application cannot carry uncached traffic, the deploy fails and the previous release keeps serving. Browsers and any CDN in front of TMXIO still receive the application’s own Cache-Control.

WordPress environments clear cached pages as content changes, so most edits need no manual clear. Publishing or updating a post clears its page and the home page. Taking a published post down (switching it to draft, pending or private, moving it to the trash, or deleting it) clears every cached page in the Environment, because archives, feeds and other pages may still list it.

Select Clear cache at the top of the screen and choose the narrowest option that covers the change:

  • Everything clears every cache layer the selected Environment uses: cached pages, the object cache, the PHP code cache, and any cache plugin TMXIO detects. It is the same command as the Clear cache button in the top bar.
  • One page removes every cached variant of one canonical URL while leaving neighbouring URLs intact.
  • Everything under a path removes the selected path and every cached path beneath it.

Every clear, whichever option or button started it, appears in Recent clears. Keep it in view until it reports Cleared. Queued confirms acceptance, not physical removal, and Waiting means the node is busy and will run the clear when it has room. Partly cleared means a full clear removed the cached pages but another cache layer reported a problem; run Clear cache again to retry it. Failed clears remain visible for diagnosis and do not report success.

After a successful clear, the next cache-eligible request reaches the Website origin and repopulates the object. A page or path clear does not flush Redis object data or purge unrelated Website Environments.

An owner or administrator can create a cache invalidation credential for a dynamic Website Environment. Store the credential as an application secret and send it as a bearer token to the environment-scoped invalidation endpoint:

Terminal window
curl -fsS -X POST \
"$TMXIO_API_URL/api/v1/sites/$SITE_SLUG/environments/$ENVIRONMENT_ID/cache_invalidations" \
-H "Authorization: Bearer $TMXIO_CACHE_INVALIDATION_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"scope":"path","path":"/catalog/item-42/","idempotency_key":"catalog-item-42-v7"}'

Use scope=site for the entire Environment or scope=prefix with a canonical path for a subtree. Use a stable, unique idempotency_key when retrying the same application event so a network retry replays the existing operation instead of starting another purge.

Rotate the credential if it is exposed. Application credentials are scoped to one Environment and cannot invalidate another Environment’s cache.

Request the changed public URL without authentication. The first eligible request after invalidation should reach the origin; a later request may be served from cache. Confirm the new content is present and Recent clears shows Cleared.

If the response remains stale, check whether Cloudflare or an application-level cache also stores the page. These layers are separate from the TMXIO response cache and require their own invalidation.