xSpeed Cache is officially live! Get 50% OFF during Launch Week — Lifetime starts at just $79Lifetime from $79 — 50% OFF, Launch Week! See Plans →

See Plans →
Features
xSpeed Hub Pricing Docs Blog Scan
Appearance
Get Plugin
NC

Purge the WordPress cache with NanoClaw

Purging the WordPress cache with NanoClaw means messaging your self-hosted agent in a chat app with its trigger word and having it clear the xSpeed cache through the xspeedhub server on its agent group.

list_sitesget_cache_statuspurge_cachepurge_cloudflarestart_preloader

Last updated: October 2026

Example session · NanoClaw

You: @Andy I changed the shared footer. Use xSpeed Hub to purge the page cache on every site.

list_sites read-only
→ 4 sites: shop, blog, docs, landing

NanoClaw: That is one purge_cache call with type page across all 4 sites. Go ahead?

You: Yes.

purge_cache(site: all, type: page) changes site
→ 4 sites: 3 purged, landing unreachable

NanoClaw: shop, blog and docs are purged. landing did not answer, so its old footer is still cached there. Try landing again now?

You: Yes, try it.

purge_cache(site: landing, type: page) changes site
→ 58 cached pages cleared

NanoClaw: landing answered this time and 58 pages were cleared. All four sites now serve the new footer.

01

How NanoClaw handles this

NanoClaw lives in the chat apps you already use, so a purge is a message. You changed the footer in your shared theme, and from Telegram you write: @Andy use xSpeed Hub to purge the page cache on every site. The agent in that group's container calls list_sites, then purge_cache, and answers in the same chat. A message is a natural place for a result per site, so a site that failed is a line in the reply rather than something you have to dig for.

The server was added to the agent group with ncl groups config add-mcp-server, the Hub's address and an Authorization: Bearer header holding the connection token, and the group was restarted to pick it up. For a purge the token has to allow writes, so Read-only everywhere must be off. The plugin reports the type, the site, how many entries were cleared, and for a purge of type all the object cache and a connected Cloudflare edge. With site: "all" the Hub runs the sites one after another and returns one result each, which is what lets the agent say landing did not answer while the others purged.

Whether NanoClaw prompts before a tool call depends on how your fork and its admins are set up. Its documentation gates adding a server behind approval but describes no per-tool prompt for the calls themselves. xSpeed Hub has no confirmation step of its own, so a purge runs once the agent calls it and your connection allows writes. For a purge of every site, the Hub tells the agent to say it will touch all of them and wait for your yes, which in NanoClaw is a question in the chat, but that is guidance to the model, not a lock.

02

Set up NanoClaw once

Already connected? Skip to the prompts. Alternatives and troubleshooting are on the NanoClaw guide.

1Put your sites in xSpeed Hub

Sign in at app.xspeedcache.com with Google or email; the Hub is free and has no site cap. Then connect each WordPress site from its own dashboard: click Connect Hub in the xSpeed Cache top bar, then Connect via xSpeed Hub. Each site needs the free xSpeed Cache plugin.

2Add xSpeed Hub to your agent group

Copy the connection token from Connect AI in the Hub (only the workspace owner sees it). Then run this on the machine that hosts NanoClaw, with your agent group's ID from ncl groups list. The header goes in as a JSON object, because NanoClaw refuses credentials inside the URL. NanoClaw may ask an admin to approve the change.

Terminal
ncl groups config add-mcp-server --id <group-id> --name xspeedhub \
  --url https://app.xspeedcache.com/xspeed/mcp \
  --headers '{"Authorization":"Bearer <your connection token>"}'

3Restart the group and ask

The new server takes effect after a restart. Then message your agent with its trigger word, @Andy by default, and ask something that names xSpeed Hub.

Terminal
ncl groups restart --id <group-id>
1 / 3

Full NanoClaw setup, sign-in options and FAQ

Before you send a prompt that changes something

Reads change nothing on your sites, though contact_support emails xSpeed support. Writes run once your connection allows them, so your client's approval prompt and a read-only connection (the token's Read-only everywhere switch, or a Viewer sign-in) are the gates that matter. Whether NanoClaw asks you before an MCP tool runs depends on how your fork and its admins are set up; its documentation gates adding a server behind approval but describes no per-tool prompt for calls. xSpeed Hub has no confirmation step of its own, so a write runs as soon as the agent calls it and your connection allows writes. The Hub tells the agent to confirm the target site and to ask once before a write that touches every site, which in NanoClaw shows up as a question in the chat. The firm stop is the token: with Read-only everywhere on, the Hub refuses every write tool. Keep it on for scheduled tasks.

03

What do I ask?

Three prompts written for NanoClaw. More for this job are below.

Prompt for NanoClaw
@Andy use xSpeed Hub to purge the page cache on every site and tell me which ones failed.
Prompt for NanoClaw
@Andy with xSpeed Hub, purge only the assets cache on blog, then start the preloader.
Prompt for NanoClaw
@Andy use xSpeed Hub to read the cache status on shop and tell me whether it needs a purge. Do not purge yet.
04

What happens, step by step

A purge throws away stored copies so the next visitor gets a fresh page. Through xSpeed Hub an agent can purge everything, only pages, only CSS and JavaScript assets, the object cache or the REST cache, on one site or across every site in a workspace. A full purge also clears the Cloudflare edge when the site has Cloudflare connected.

01

Find the site

The agent calls list_sites when you have more than one site, then matches the name you used to a site handle. If the name could mean two sites, the Hub tells it to ask you rather than guess.

02

Pick the purge type

purge_cache takes a type: all, page, assets, object or rest. all clears the page cache, the object cache and, when they are connected, the Cloudflare edge and CDN. After a theme or CSS change, assets is enough; after a content edit, page; after a deploy, all.

03

Purge

The call runs straight away on that site once your connection allows writes. For every site at once the agent passes site: "all", and the Hub runs the sites one after another with a one-second pause.

04

Clear only the edge if that is all you need

purge_cloudflare empties the Cloudflare edge cache on its own, without touching the copies on your server. A page or assets purge does not reach Cloudflare; a purge of type all does when Cloudflare is connected.

05

Warm it again

start_preloader rebuilds the cache in the background so the first visitors after the purge are not the ones paying for it.

05

Reference

Toolpurge_cache (write)
Purge typesall, page, assets, object, rest
What all coversPage cache, object cache, plus the Cloudflare edge and CDN when connected
Every site at oncesite: "all" or a list of handles, one result per site
Fan-out pacingSites run one after another with a 1 second pause
Edge onlypurge_cloudflare, a separate write tool
Re-warmstart_preloader after the purge
Read-only accesspurge_cache is refused on a connection token with Read-only everywhere on, and for a Viewer sign-in
ConfirmationNone on the Hub; your client's prompt is the gate
06

Rules worth keeping

  • Name the site. With several sites, an unclear name should make the agent ask, and the Hub tells it to.
  • A purge of every site is one call with site: "all". The Hub tells the agent to confirm it with you once before it runs.
  • Purge the narrowest type that fixes the problem, then warm the cache, so visitors do not all hit uncached pages at once.
  • A fan-out result is reported per site. Treat some sites failing as a partial result, not a failure of the whole call.

Good to know with NanoClaw

The token in the group's container configuration is the whole permission model here. With Read-only everywhere off, anyone who can message the agent with its trigger word in that chat can ask it to purge your sites, and in a group chat that may be more people than you expect. Add the server only to agent groups whose chats you control, or hold the token in NanoClaw's credential gateway as its gateway documentation describes. Keep scheduled tasks from ncl tasks create to reads, because a task has no conversation attached and nobody can answer the Hub's ask-once question. Turning Read-only everywhere on stops every purge, and it applies to every client that sends the same token.

07

More prompts for this job

They work in any client connected to xSpeed Hub.

Prompt
Use xSpeed Hub to purge the page cache on blog.
Prompt
I just changed the theme CSS on shop. Use xSpeed Hub to purge only the assets cache there.
Prompt
With xSpeed Hub, purge every site in my workspace and tell me which ones failed.
Prompt
Use xSpeed Hub to purge shop, then purge its Cloudflare edge cache too.
Prompt
With xSpeed Hub, purge the docs site and start the preloader so it is warm again.
Prompt
Using xSpeed Hub, what purge type should I use after updating a plugin that changes the checkout page?
08

Frequently asked questions

Yes. Add xSpeed Hub to the agent group with ncl groups config add-mcp-server and a connection token that allows writes, restart the group, and message the agent with its trigger word. It calls purge_cache and replies with a result per site.

Anyone who can message the agent with its trigger word in a chat where it answers, because the token on the agent group is what the Hub checks. xSpeed Hub has no confirmation step of its own. Keep the server on groups you control, or turn on Read-only everywhere on the token to stop every purge.

all clears every cache xSpeed manages for the site, including a connected Cloudflare zone or CDN. page clears the stored HTML pages, assets clears minified and combined CSS and JavaScript, object clears the Redis or Memcached object cache, and rest clears cached REST API responses.

A purge of type all does, when the site has Cloudflare connected in xSpeed: it clears the page cache, the object cache and the Cloudflare edge, and reports each one. A page, assets or rest purge stays on your server. purge_cloudflare clears only the edge.

Yes. The agent passes site: "all" to purge_cache and the Hub purges every site in the workspace one after another, returning a result per site. The Hub tells the agent to confirm a write across every site with you once before it runs it.

The next request to each purged page builds it fresh, which is slower than a cached hit. Starting the preloader right after the purge rebuilds the cache in the background so visitors mostly land on warm pages.

09

Keep going

Purge the cache with other agents

More with NanoClaw

Documentation

From the blog

Purge the cache, from NanoClaw.

xSpeed Hub is free and has no site cap. Connect your sites once and ask from the agent you already use.