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

Start free trial

Turn Caching On Or Off

litespeed/set-cache-state turns LiteSpeed page caching on or off site-wide.

Disabling requires confirm: true. Enabling does not.

At a glance

Abilitylitespeed/set-cache-state
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

Switching it off is silent

Disabling caching has no visible symptom. The site keeps working, every page keeps rendering, and the only difference is that every request now costs real server work. Sites sit uncached for weeks after a debugging session because nothing anywhere says so. Enabling does not need confirmation; disabling does.

The asymmetry, and why

Turning caching on can make a site behave strangely — a stale page here, a logged-in greeting on a logged-out view there — and all of those symptoms are visible. Somebody notices, and the fix is one call away.

Turning caching off produces no symptom at all. The site is correct, complete and slow. On a quiet site nobody notices for weeks; on a busy one the first sign is the hosting bill or a server falling over under load that used to be absorbed by the cache.

So the gate is on the direction that fails silently. This is the same reasoning that puts no gate on deactivating a code snippet and one on activating it — it follows the consequence, not the verb.

Idempotent: turning caching on when it is already on changes nothing.

Switching caching off does not purge. The cached pages remain and are simply not served, so switching back on serves whatever was there before — which may be very stale.

Input

NameTypeRequiredWhat it is
enabledbooleanYesWhether page caching is on.
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
enabledbooleanThe state after the write.
changedbooleanWhether this call changed anything.
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:

Turn LiteSpeed caching back on.

It resolves to one call:

{
  "ability": "litespeed/set-cache-state",
  "parameters": {
    "enabled": true
  }
}

Worth knowing

  • Disabling needs confirmation; enabling does not.
  • Switching off does not purge. Re-enabling can serve very old pages — purge first.
  • No front-end symptom either way. Confirm with litespeed/get-cache-status.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading