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
Pc

Purge the WordPress cache with Paperclip

Purging the WordPress cache with Paperclip means assigning a ticket to an agent Paperclip runs, such as Claude Code, which then clears the xSpeed cache on the right site through the xSpeed Hub server it was given.

list_sitesget_cache_statuspurge_cachepurge_cloudflarestart_preloader

Last updated: October 2026

Example session · Paperclip

You: Ticket: the theme deploy to shop is done. Use xSpeed Hub to clear the stale cache, and wait for my reply before any change.

list_sites read-only
→ 3 sites: shop, blog, docs

get_cache_status(site: shop) read-only
→ page cache on, 344 cached pages, assets cache 71 files

Paperclip: The deploy changed templates and the stylesheet, so pages and assets on shop are both stale. Proposed: purge_cache with type all on shop. Reply to approve.

You: Approved.

purge_cache(site: shop, type: all) changes site
→ page cache purged (344 entries), object cache flushed, no Cloudflare zone connected

Paperclip: Done and noted on the ticket. No Cloudflare zone is connected, so nothing went to an edge. I can start the preloader as a follow-up task.

01

How Paperclip handles this

In Paperclip a purge is a ticket, not a chat message. Your release agent finished deploying a theme change, and you open a task for the web agent: purge the stale pages on shop and record what was cleared. Paperclip wakes the agent, the agent calls list_sites and purge_cache, and the tool calls and their results sit on the task with a trace you can read later. If the ticket says to wait for a reply before any change, the agent posts its plan and stops.

Paperclip does not call MCP tools itself, so the Hub sits on the agent it runs. On the adapter route, claude mcp add was run as the OS user the heartbeat runs as, and a sign-in in one interactive claude session left credentials that the headless runs reuse. On the connector route, the Hub is attached on Paperclip's Connectors page, where each of its tools is set to Allowed, Ask first or Off. Either way the result is the plugin's report: type, site, entries cleared, and for a purge of type all the object cache and a connected Cloudflare edge. The agent can follow with start_preloader and note the queued URLs on the ticket.

The route decides the approval. The Claude Code adapter runs headless with dangerouslySkipPermissions on by default, and a server added on the adapter does not pass through Paperclip's action permissions or review queue, so a purge there runs as soon as the agent calls it. On the connector route, purge_cache can be set to Ask first, which holds the call until a person approves it. xSpeed Hub has no confirmation step of its own, so one of those two has to hold the purge. For a purge of every site the Hub also tells the agent to confirm once, which is guidance to the model, not a lock.

02

Set up Paperclip once

Already connected? Skip to the prompts. Alternatives and troubleshooting are on the Paperclip 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 the agent Paperclip runs

For a Claude Code agent, run this on the machine that hosts it, as the same OS user the Paperclip heartbeat runs as. Paperclip's docs say MCP wiring lives at the adapter and runtime layer, and user scope makes the Hub available to every Claude Code agent that user runs.

Terminal
claude mcp add --transport http --scope user xspeedhub https://app.xspeedcache.com/xspeed/mcp

3Sign in once, or use a token

Start claude interactively as that same user, run /mcp, choose xspeedhub and approve access on the xSpeed Hub page. Claude Code keeps the credentials, so later headless runs need no browser; claude mcp get xspeedhub shows the status. On a host with no browser, add the server with the connection token from Connect AI in the Hub instead, ideally with Read-only everywhere on.

Terminal
# Interactive sign-in
claude
/mcp

# Or a token, no browser
claude mcp add --transport http --scope user xspeedhub https://app.xspeedcache.com/xspeed/mcp \
  --header "Authorization: Bearer <your connection token>"
1 / 3

Full Paperclip 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. Paperclip's Claude Code adapter runs headless with dangerouslySkipPermissions on by default, which lets the agent call MCP tools without asking. Set it to false and a tool that needs approval does not run. A server added on the adapter does not pass through Paperclip's action permissions or review queue. A Paperclip connector does: each Hub tool is set to Allowed, Ask first or Off, and because the Hub publishes no annotations Paperclip classifies them by name, which can under-classify, so start every write Off. xSpeed Hub has no confirmation step of its own, so a write that gets past those settings runs as soon as your connection allows writes. For unattended routines, send a connection token with Read-only everywhere on, which makes the Hub refuse every write tool.

03

What do I ask?

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

Prompt for Paperclip
Ticket: use xSpeed Hub to purge the page cache on shop after today's theme deploy, and record the count on this task.
Prompt for Paperclip
With xSpeed Hub, propose the right purge type on blog for the change in this ticket. Post the plan and wait for my reply before you run it.
Prompt for Paperclip
Use xSpeed Hub to purge every site in my workspace after the plugin update and post one line per site, including any failures.
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 Paperclip

The Hub publishes no tool annotations, so on the connector route Paperclip classifies its tools by name, which can under-classify. Check where purge_cache landed before you rely on it, start it Off, and promote it to Ask first on purpose. Refresh actions can widen what agents may call, so look at the list again after a refresh. Keep purges out of routines: a routine creates a task on a cron schedule and wakes the agent with nobody watching, and with the adapter skipping prompts a weekly purge would run unreviewed. If a routine only needs to report, give that agent a connection token with Read-only everywhere on, which makes the Hub refuse every write.

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. Give the agent Paperclip runs the xSpeed Hub server, either with claude mcp add on its host or on the Connectors page, then assign it a ticket. It calls purge_cache with a type that fits and records the result on the task.

The connector route. There you set purge_cache to Ask first, and the call waits for a person. A server added on the Claude Code adapter bypasses Paperclip's action permissions and review queue, and the adapter skips permission prompts by default, so a purge there runs at once.

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 Paperclip

Documentation

From the blog

Purge the cache, from Paperclip.

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