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

Start free trial

Update Cache Exclusions

litespeed/update-cache-exclusions changes one cache exclusion list: add to it, remove from it, or replace it.

The mode is what makes this safe to use from an assistant.

At a glance

Abilitylitespeed/update-cache-exclusions
ToolsetLiteSpeed Cache — toolset/litespeed
GroupLiteSpeed Cache › Page Cache
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 add and remove exist at all

The obvious API for a list is “here is the new list”. It is also the one that loses entries: to add a line you must first read the list, append, and write the whole thing back — and any entry added between the read and the write is gone, along with any entry the caller did not think to include.

With add and remove, adding one exclusion is one call that touches one line. Nothing else in the list is in play.

The types cover the six lists plus the forced and query-string ones: uri, category, tag, cookie, user-agent, role, force-uri, force-public-uri, private-uri and drop-query-string.

Excluding a URI is the standard fix for a page that must not be cached — a checkout, a live dashboard, anything that renders per request. It is also the standard over-reaction to a caching bug, so prefer the narrowest exclusion that works.

Input

NameTypeRequiredWhat it is
typestringYesWhich list: uri, category, tag, cookie, user-agent, role, force-uri, force-public-uri, private-uri or drop-query-string.
valuesarrayYesThe entries to add, remove or set.
modestringNo — defaults to addadd, remove or replace.

What comes back

NameTypeWhat it is
updatedarrayThe keys that actually changed. An empty array means every value you sent was already set.
settingsarrayEvery setting in the area after the write, in the read shape.
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:

Stop caching the checkout page.

It resolves to one call:

{
  "ability": "litespeed/update-cache-exclusions",
  "parameters": {
    "type": "uri",
    "values": ["/checkout"],
    "mode": "add"
  }
}

Worth knowing

  • Use add and remove rather than replace unless you really mean to set the whole list.
  • Prefer the narrowest exclusion that fixes the problem.
  • Purge after excluding a URI — the old cached copy is still there until you do.
  • Idempotent in every mode.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading