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

Start free trial

Purge By Cache Tag

litespeed/purge-by-tag purges by raw LiteSpeed cache tag.

It is the escape hatch, for callers that already know the tag scheme and need a set of pages none of the other purge abilities addresses.

At a glance

Abilitylitespeed/purge-by-tag
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

What a cache tag is

LiteSpeed tags every cached page with the things it depends on — the post, its author, its terms, the template it used. Purging a tag purges everything carrying it, which is how purging one post can clear the twenty archive pages it appears on without anyone enumerating them.

The other purge abilities in this suite are all tag purges underneath, with the tag worked out for you. This one takes the tag directly.

That makes it precise and unforgiving in equal measure. A plugin that defines its own tags can be purged exactly; a tag that does not exist purges nothing and reports success, because from LiteSpeed’s point of view purging a tag with no entries is a no-op rather than an error.

Reach for a named ability first. This is for the case they do not cover.

Input

NameTypeRequiredWhat it is
tagsarrayYesThe raw LiteSpeed cache tags to purge.

What comes back

NameTypeWhat it is
purgedarrayThe tags that were purged.
countintegerHow many.
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:

Purge everything tagged with our custom template tag.

It resolves to one call:

{
  "ability": "litespeed/purge-by-tag",
  "parameters": {
    "tags": ["ESI.widget.custom"]
  }
}

Worth knowing

  • A tag that does not exist purges nothing and still reports success.
  • The named purge abilities are tag purges with the tag worked out for you. Prefer them.
  • Useful for plugin-defined tags nothing else addresses.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading