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

Find out why WordPress pages are not cached with GitHub Copilot in VS Code

Finding out why pages are not cached with GitHub Copilot in VS Code means asking agent mode to read xSpeed cache status, health checks and a benchmark through xSpeed Hub, and to email support when nothing explains it.

list_sitesget_cache_statusget_healthrun_benchmarkget_benchmark_historyget_pro_audittoggle_cachecontact_support

Last updated: October 2026

Example session · GitHub Copilot in VS Code

You: shop is not serving cached pages and I cannot see why. Dig in with xSpeed Hub.

get_cache_status(site: shop) read-only
→ page cache on, 3 cached pages, hit ratio 2% in the last 24h, last purge 2 days ago

get_health(site: shop) read-only
→ all environment checks pass, no plugin conflicts

run_benchmark(site: shop) read-only
→ home page: 531 ms uncached, 498 ms on the cached request, cached request was not a hit

GitHub Copilot in VS Code: Everything xSpeed checks looks right, and the home page still does not hit the cache. These tools cannot explain that. I can email xSpeed support with the numbers and your site list. Send this: "shop: caching on, health checks pass, benchmark shows no cache hit on the home page"?

You: Send it.

contact_support(subject: shop pages not served from cache, message: "shop: caching on, health checks pass, benchmark shows no cache hit on the home page") sends email
→ message sent to xSpeed support; replies go to your account email

GitHub Copilot in VS Code: Sent. Support will reply to the email on your xSpeed account.

01

How GitHub Copilot in VS Code handles this

You are in VS Code with the site's theme open and Copilot in agent mode. Pages are not coming from the cache, and every check you can think of looks fine. You ask: why is shop not serving cached pages? Copilot calls the xSpeed tools and shows each one in the chat as it runs.

Most causes show up in get_health: a missing drop-in, an undefined WP_CACHE constant, a cache directory that cannot be written, plain permalinks, a conflicting caching plugin. In this session none of them do. get_cache_status shows caching on, a hit ratio of 2% and a purge two days ago, and run_benchmark shows the cached request was not a hit. When the tools run out of answers, the Hub tells the agent to use contact_support, which emails xSpeed support with your account and site list. Copilot writes the message from what it found.

VS Code starts in Manual permissions: a tool call that is not auto-approved shows a confirmation, and you can allow it once or for the session, the workspace or all future calls. Chat: Manage Tool Approval lists the xSpeed tools grouped by server. You will see the dialog for each xSpeed tool the first time it is called. Keep the question specific. Give Copilot the site handle, say what you already tried, and ask it to list the checks it ran before it concludes anything. That way, if it does reach for support, the message it drafts already says what was ruled out, and the person reading it does not have to repeat your steps.

02

Set up GitHub Copilot in VS Code once

Already connected? Skip to the prompts. Alternatives and troubleshooting are on the GitHub Copilot in VS Code 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 user mcp.json

Open the Command Palette and run MCP: Open User Configuration, then add this entry. Servers in your user profile are available in every workspace. MCP: Add Server walks you through the same thing, and the project-level .mcp.json file works too if you want the entry shared with your team; that file uses a top-level mcpServers object instead of servers.

mcp.json (MCP: Open User Configuration)
{
  "servers": {
    "xspeedhub": {
      "type": "http",
      "url": "https://app.xspeedcache.com/xspeed/mcp"
    }
  }
}

3Start the server and sign in

Run MCP: List Servers, pick xspeedhub and choose Start. VS Code asks whether you trust the server, then opens a browser page where you sign in to xSpeed Hub and approve access. There is no token to paste, and VS Code keeps the credentials it receives. Open the Chat view and use the Configure Tools button to see the xSpeed tools.

Text
MCP: List Servers
1 / 3

Full GitHub Copilot in VS Code 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. In VS Code the default permission level is Manual permissions: a tool call that is not auto-approved shows a confirmation, and you can allow it once or for the session, the workspace or all future calls. Chat: Manage Tool Approval lists tools grouped by MCP server, so you can trust get_cache_status and the other reads while purge_cache and update_settings stay on a prompt. Allow all, Autopilot and global auto-approval skip those prompts, including for external tool calls, and then a write runs as soon as your connection allows writes. xSpeed Hub has no confirmation step of its own.

03

What do I ask?

Three prompts written for GitHub Copilot in VS Code. More for this job are below.

Prompt for GitHub Copilot in VS Code
Use xSpeed Hub to diagnose why shop is not serving cached pages. Read the status and the health report and run the benchmark before you suggest anything.
Prompt for GitHub Copilot in VS Code
Nothing in the xSpeed Hub health report explains the misses. Draft a message to xSpeed support with the numbers and show it to me first.
Prompt for GitHub Copilot in VS Code
After I fix the cache directory permissions, rerun the benchmark on docs with xSpeed Hub and tell me whether it hits.
04

What happens, step by step

When a WordPress page is not served from cache, the cause is usually one of a few things: caching is off, the cache drop-in or the WP_CACHE constant is missing, another caching plugin is in the way, or the pages carry something that makes them uncacheable. Through xSpeed Hub an agent can read the cache status, run the site's full health diagnostics, time a cached request against an uncached one, and check which Pro features would help, all without changing anything.

01

Start with the quick summary

get_cache_status returns whether page caching is on, the stats (cached pages, size, hit ratio, last purge) and the web server xSpeed detected. It is a glance. If caching is off, or the hit ratio is far below what you expect, the agent moves on to the diagnostic.

02

Run the diagnostic

get_health is the tool for troubleshooting. It returns the environment checks with pass or warn tones (the advanced-cache.php drop-in, the WP_CACHE constant, rewrite rules, PHP and WordPress versions, caching plugin conflicts), the cache stats, 24 hourly hit and miss buckets and a 30-day hit-ratio series. The Hub tells the agent to use it, not get_cache_status, when you are troubleshooting rather than glancing.

03

Time cached against uncached

run_benchmark requests the home page once with the cache bypassed and once normally, after a warm-up request, and returns the timings. If the second request still is not a cache hit, the page cache is not serving the home page, and the result says so. It measures xSpeed's own response time. It does not return a Lighthouse score.

04

Read what the checks mean

A warn is a lead, not always a fault. A static-file rewrite warning, for example, can mean the nginx snippet is not in your server config yet, or that xSpeed could not verify it, which is not evidence the config is wrong. The agent reads the detail line and tells you which one it is.

05

Fix it or hand it over

If caching is simply off, toggle_cache turns it on. If another caching plugin owns the drop-in, the site refuses to enable xSpeed and says why; removing the other plugin is yours to do. If nothing explains it, contact_support emails xSpeed support with the agent's summary, after the agent has confirmed the message with you.

05

Reference

Quick checkget_cache_status (read): cache on or off, stats, detected web server
Diagnosticget_health (read): environment checks, 24 hourly buckets, 30-day hit-ratio series, recent activity
One site per callget_health does not accept site: "all"; call it for each site you care about
Benchmarkrun_benchmark (read): home page only, cache bypassed against cache served, timings in milliseconds
Benchmark on every siterun_benchmark accepts site: "all" or a list of handles, one result per site
Benchmark historyget_benchmark_history reads past runs and the settings changes on the same timeline
Pro suggestionsget_pro_audit (read): which Pro features would help this site, from its settings and stats
Hit ratio scopeCounts requests that reach your server; pages answered by a CDN or Cloudflare edge are not counted
Supportcontact_support emails xSpeed support with your account email and site list attached; classed read
Turning caching ontoggle_cache (write); refused by the site when another plugin owns the cache drop-in
06

Rules worth keeping

  • Diagnose with the read tools first. get_cache_status, get_health, run_benchmark and get_pro_audit change nothing on the site, so a read-only connection can run all of them. For clients that send the connection token, that means Read-only everywhere on; an OAuth sign-in gets the scopes the client asks for, unless the member is a Viewer.
  • Do not answer a PageSpeed question with run_benchmark. It measures cached against uncached response time and returns no Lighthouse score; for a score, use the speed test or scan jobs.
  • toggle_cache is a write. It runs as soon as your connection allows writes, and the Hub tells the agent to confirm the target site first. That is guidance to the agent, so your client's approval prompt is the gate that matters.
  • contact_support sends a real email. The Hub tells the agent to confirm the message with you before sending, but the tool is classed read, so even a read-only connection can send one.
  • The agent cannot edit your server configuration or another plugin's settings. When a check needs an nginx snippet or a conflicting plugin removed, it tells you what to do and you do it.

Good to know with GitHub Copilot in VS Code

Choose the scope of each allow on purpose. Allowing get_health for the workspace is reasonable, since it only reads. Allowing contact_support the same way means later sessions can send mail to xSpeed support without a dialog, as do Allow all and Autopilot for every tool, and the Hub's request that the agent confirm the message with you is guidance, not a lock. Read the message the dialog shows before you accept, and edit out anything about your site that you do not want sent.

07

More prompts for this job

They work in any client connected to xSpeed Hub.

Prompt
Using xSpeed Hub, why is the cache hit ratio so low on shop? Run the full health check and tell me the most likely cause.
Prompt
Using xSpeed Hub, is page caching actually working on blog? Benchmark cached against uncached and tell me if the second request was a hit.
Prompt
xSpeed Hub's get_health on docs shows a warning about the static-file rewrite. What does it mean and do I need to act?
Prompt
Use xSpeed Hub to check whether another caching plugin is conflicting with xSpeed on shop.
Prompt
Caching looks off on the staging site. Use xSpeed Hub to turn it on and tell me if the site refuses.
Prompt
Using xSpeed Hub, which Pro features would help the shop site, based on how it is set up now?
Prompt
With xSpeed Hub, compare the last few benchmark runs on blog and tell me whether my settings changes helped.
08

Frequently asked questions

Yes. In agent mode it calls the xSpeed Hub tools for cache status, health checks and a benchmark, and reports which check fails. It works from the chat panel, so you can keep the theme files open beside it.

It can use contact_support to email xSpeed support with your findings. VS Code asks you to confirm the tool call, and the Hub also tells the agent to confirm the message with you first, so read the draft before you approve it.

The common causes are that page caching is switched off, the advanced-cache.php drop-in or the WP_CACHE constant in wp-config.php is missing, another caching plugin owns the drop-in, or the pages set cookies or headers that make them uncacheable. An agent can read all of these from get_health through xSpeed Hub and tell you which one applies to your site.

get_cache_status is a quick summary: whether caching is on, the stats and the detected web server. get_health is the diagnostic. It adds the environment checks with pass or warn tones, 24 hourly hit and miss buckets and a 30-day hit-ratio series. The Hub tells the agent to use get_health when you are troubleshooting.

No. run_benchmark measures how fast your own cache answers compared with an uncached request for the home page. For a Lighthouse score, ask for a speed test or a speed scan instead.

Only partly. run_benchmark accepts every site in one call. get_cache_status and get_health take one site per call, and get_health does not accept site: "all", so for a fleet the agent calls them site by site or you use the Hub dashboard for the rollup.

Not with the diagnostic tools. They are read tools and change nothing. Changes only happen if the agent calls a write tool such as toggle_cache, which runs once your connection allows writes, so your AI client's approval prompt and a read-only connection (the connection token with Read-only everywhere on, or a Viewer sign-in) are the gates.

09

Keep going

Find out why pages are not cached with other agents

More with GitHub Copilot in VS Code

Documentation

From the blog

Find out why pages are not cached, from GitHub Copilot in VS Code.

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