30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Purge Taxonomy Archives

litespeed/purge-taxonomy purges the cached archive pages for categories or tags.

It accepts either slugs or numeric term IDs, and resolves the IDs itself.

At a glance

Abilitylitespeed/purge-taxonomy
ToolsetLiteSpeed Cache — toolset/litespeed
GroupLiteSpeed Cache › Purging
RequiresLiteSpeed Cache, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

Why the IDs have to be resolved

LiteSpeed’s own taxonomy purge takes a slug. Hand it a numeric ID and it does not error — it simply does not match anything, and the call returns successfully having purged nothing.

That is a bad failure to hand a caller who has a term ID, which is the form most programmatic callers have. So IDs are resolved to slugs before the purge, and terms that do not exist are reported back rather than quietly dropped.

Archive pages go stale in ways individual posts do not: a post moved out of a category changes that category’s archive without changing any single post page, and nothing in the post save necessarily purges it.

For a post edit, litespeed/purge-post already covers the archives. This is for when the archive itself is the thing that changed.

Input

NameTypeRequiredWhat it is
taxonomystringYesThe taxonomy, for example category.
termsarrayYesSlugs or numeric term IDs.

What comes back

NameTypeWhat it is
purgedarrayThe terms that were purged.
not_foundarrayTerms that do not exist.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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:

Clear the cached archive for the news category.

It resolves to one call:

{
  "ability": "litespeed/purge-taxonomy",
  "parameters": {
    "taxonomy": "category",
    "terms": ["news"]
  }
}

Worth knowing

  • IDs are resolved to slugs. Passing an ID to LiteSpeed directly would purge nothing.
  • Unknown terms are reported back.
  • Purging a post already covers its archives — this is for archive-only changes.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading