rank-math/invalidate-sitemap-cache clears Rank Math’s cached sitemap files so the next request regenerates them.
Use scope=all after a settings change, scope=type for one sitemap type, or scope=post with a post ID for a single entry.
At a glance
| Ability | rank-math/invalidate-sitemap-cache |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Sitemaps & llms.txt |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
The response reports cache_enabled, and that field is the one to read first. When caching is off, the sitemap is generated on every request and this call did nothing — which is a useful thing to know before spending time wondering why clearing the cache did not fix anything.
The scopes exist because regeneration is not free. A full sitemap regeneration on a site with a hundred thousand posts is real work, and clearing everything to fix one post is wasteful in the same way a full cache purge is.
After a settings change, scope=all is correct — the change affects which files exist, not just their contents.
Idempotent, and cheap when nothing is cached.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
scope | string | No — defaults to all | all, type or post. |
post_id | integer | Required for scope=post | The post to clear. |
type | string | Required for scope=type | The sitemap type to clear. |
What comes back
| Name | Type | What it is |
|---|---|---|
cleared | boolean | Whether anything was cleared. |
cache_enabled | boolean | Whether sitemap caching is on. When false, this call was a no-op. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
I changed the sitemap settings — make them take effect.
It resolves to one call:
{
"ability": "rank-math/invalidate-sitemap-cache",
"parameters": {
"scope": "all"
}
}Worth knowing
- Read
cache_enabled. When it is false this call did nothing, correctly. - Use the narrowest scope that fixes the problem.
- A settings change needs
scope=all. - Idempotent.
Related abilities
- Update Rank Math Sitemap Settings — what needs clearing after
- List Rank Math Sitemap URLs — confirm the change appeared
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category