Developers

Zinn® Cache abilities reference

Zinn® Cache registers its actions with the WordPress Abilities API. The same abilities are MCP tools on the site's own server and REST routes under /wp-json/wp-abilities/v1. This page is generated from the plugin's own registry.

User guide: connect an AI app

Zinn®, our Viking, cheering as an AI assistant connects to the platform's tools.

Endpoints

MCP over HTTP (streamable)

https://example.com/wp-json/zinn-cache/v1/mcp

MCP over WP-CLI (standard input and output)

wp mcp-adapter serve --server=zinn-cache --user=<login>

REST: list the abilities

/wp-json/wp-abilities/v1/abilities?category=zinn-cache

REST: run an ability

/wp-json/wp-abilities/v1/abilities/<name>/run

Authentication and permissions

HTTP requests authenticate with a WordPress application password (HTTP Basic). Connecting to the MCP server needs the capability shown below; every ability then checks its own permission, per object. Read-only abilities run with GET and their input in the query string; the others with POST and a JSON body {"input": {…}}.

Examples

# REST: run an ability
curl -u your-username:your-application-password \
  "https://example.com/wp-json/wp-abilities/v1/abilities/zinn-cache/get-cache-layers/run"
# MCP (JSON-RPC over HTTP, after "initialize")
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"zinn-cache-get-cache-layers","arguments":{}}}

All abilities

Generated from the plugin's abilities.json, which is itself generated from a running site; a test fails when the two disagree.

AbilityWhat it doesEditionRESTPermissionParameters
zinn-cache/clean-database
zinn-cache-clean-database
Clean up the database (Pro)
Removes, in the background, the kinds of clutter switched on in the settings. What is removed cannot be brought back.
Pro editionPOST …/abilities/zinn-cache/clean-database/runmanage_optionsnone
zinn-cache/convert-images
zinn-cache-convert-images
Convert all existing images (Pro)
Starts converting the media library's images to the modern formats switched on in the settings, in the background.
Pro editionPOST …/abilities/zinn-cache/convert-images/runmanage_optionsnone
zinn-cache/detect-cache-layers
zinn-cache-detect-cache-layers
Detect the caches in front of the site
Requests the home page as a visitor would and stores which caches answered. With sample: true it also requests the newest pages twice and counts how often each layer served them from its cache.
Free editionPOST …/abilities/zinn-cache/detect-cache-layers/runmanage_options (the REST route's own check)sample: boolean
zinn-cache/get-cache-analytics
zinn-cache-get-cache-analytics
Read the cache analytics (Pro)
Returns the object cache's hit rate and traffic for the last hours (hours, up to 720), its slowest commands, and which plugins miss the cache most.
Pro editionGET …/abilities/zinn-cache/get-cache-analytics/runmanage_optionshours: integer
zinn-cache/get-cache-layers
zinn-cache-get-cache-layers
Read what is caching the site
Returns which cache serves pages (LiteSpeed, nginx, Varnish, Apache, Cloudflare or the plugin's disk cache), what the last detection saw, each layer's size where WordPress can read it, the purge queue, the paced refresh and the recent purges.
Free editionGET …/abilities/zinn-cache/get-cache-layers/runmanage_options (the REST route's own check)none
zinn-cache/get-diagnostics
zinn-cache-get-diagnostics
Read the diagnostics report
Returns the diagnostics report support asks for: versions, server limits, the cache state and recent errors. It holds no passwords or keys.
Free editionGET …/abilities/zinn-cache/get-diagnostics/runmanage_optionsnone
zinn-cache/get-image-progress
zinn-cache-get-image-progress
Read the image conversion progress (Pro)
Returns how far converting (or removing) the images has got.
Pro editionGET …/abilities/zinn-cache/get-image-progress/runmanage_optionsnone
zinn-cache/get-pro-settings
zinn-cache-get-pro-settings
Read the Cache Pro settings (Pro)
Returns every Cache Pro setting (warm-up, images, scripts and styles, database clean-up, smart purging, the finder). Secrets are never returned.
Pro editionGET …/abilities/zinn-cache/get-pro-settings/runmanage_optionsnone
zinn-cache/get-settings
zinn-cache-get-settings
Read the cache settings
Returns every cache setting. The Redis password and the Cloudflare token are never returned, only whether one is saved.
Free editionGET …/abilities/zinn-cache/get-settings/runmanage_optionsnone
zinn-cache/get-slow-queries
zinn-cache-get-slow-queries
Read the slow-query finder (Pro)
Returns the slowest database queries and outgoing calls the finder has seen, with the plugin or theme that made each one.
Pro editionGET …/abilities/zinn-cache/get-slow-queries/runmanage_optionsnone
zinn-cache/get-status
zinn-cache-get-status
Read the cache status
Returns whether the page cache and the object cache are on and working, how many pages are cached, and the object cache's connection and hit numbers.
Free editionGET …/abilities/zinn-cache/get-status/runmanage_optionsnone
zinn-cache/get-warmup-progress
zinn-cache-get-warmup-progress
Read the warm-up progress (Pro)
Returns whether the warm-up is running, how many pages it has visited and how many failed.
Pro editionGET …/abilities/zinn-cache/get-warmup-progress/runmanage_optionsnone
zinn-cache/preview-database-cleanup
zinn-cache-preview-database-cleanup
Preview the database clean-up (Pro)
Counts what a clean-up would remove, per kind (revisions, drafts, spam, expired temporary data and the like). Nothing is removed.
Pro editionGET …/abilities/zinn-cache/preview-database-cleanup/runmanage_optionsnone
zinn-cache/purge
zinn-cache-purge
Purge the cache
Discards cached pages: everything (all: true), some addresses (urls) or everything tagged (tags). Pages are rebuilt as visitors arrive.
Free editionPOST …/abilities/zinn-cache/purge/runmanage_options (the REST route's own check)all: boolean, urls: array, tags: array
zinn-cache/purge-urls
zinn-cache-purge-urls
Purge some addresses on every cache layer
Removes these addresses (paths such as /about/ or full addresses on this site) from the disk cache, the server cache and Cloudflare at once, and says what each layer answered.
Free editionPOST …/abilities/zinn-cache/purge-urls/runmanage_options (the REST route's own check)urls: array (required)
zinn-cache/refresh-cache
zinn-cache-refresh-cache
Start or stop the paced refresh
action: start refreshes every page a batch per minute (what updates do instead of emptying the cache); action: stop ends a running refresh.
Free editionPOST …/abilities/zinn-cache/refresh-cache/runmanage_options (the REST route's own check)action: start|stop (required)
zinn-cache/remove-converted-images
zinn-cache-remove-converted-images
Remove all converted images (Pro)
Deletes every converted copy of the images in the background; the originals stay.
Pro editionPOST …/abilities/zinn-cache/remove-converted-images/runmanage_optionsnone
zinn-cache/reset-settings
zinn-cache-reset-settings
Put the cache settings back to their defaults
Puts every cache setting back to its default, as the Reset button does. The saved Redis password is removed too.
Free editionPOST …/abilities/zinn-cache/reset-settings/runmanage_optionsnone
zinn-cache/reset-slow-queries
zinn-cache-reset-slow-queries
Clear the slow-query findings (Pro)
Forgets every slow query and slow call found so far, and the finder starts again.
Pro editionPOST …/abilities/zinn-cache/reset-slow-queries/runmanage_optionsnone
zinn-cache/update-pro-settings
zinn-cache-update-pro-settings
Change the Cache Pro settings (Pro)
Changes the Cache Pro settings you send (settings: key to value) and keeps the rest. Each value is checked exactly as on the Cache Pro screen; an unknown key is refused.
Pro editionPOST …/abilities/zinn-cache/update-pro-settings/runmanage_optionssettings: object (required)
zinn-cache/update-settings
zinn-cache-update-settings
Change the cache settings
Changes the settings you send and keeps the rest (page cache, how long pages stay cached, the object cache and its Redis connection, purging rules and exclusions). Values are checked and corrected exactly as on the Cache screen.
Free editionPOST …/abilities/zinn-cache/update-settings/runmanage_optionslscache_enabled: boolean, lscache_ttl: integer, object_cache_enabled: boolean, auto_purge_enabled: boolean, purge_on_upgrade: boolean, exclude_uris: array|object|string, exclude_query_keys: array|object|string, exclude_cookies: array|object|string, redis_host: string, redis_port: integer, redis_database: integer, redis_username: string, redis_password: string, redis_key_prefix: string, browser_ttl: integer, cache_logged_out_only: boolean, purge_on_comment: boolean, ttl_overrides: array|object|string, server_cache: string, server_cache_headers: boolean, nginx_purge_method: string, nginx_purge_endpoint: string, nginx_http_verb: string, nginx_purge_address: string, nginx_cache_path: string, nginx_cache_levels: string, nginx_cache_key: string, nginx_key_variants: array|object|string, nginx_spool_dir: string, varnish_host: string, varnish_port: integer, varnish_method: string, apache_cache_root: string, apache_dir_levels: integer, apache_dir_length: integer, cloudflare_enabled: boolean, cloudflare_zone_id: string, cloudflare_api_token: string, cloudflare_purge_everything: boolean, refresh_batch: integer, refresh_load_limit: integer, redis_serializer: string, heartbeat_mode: string, font_display_swap: boolean, preconnect_origins: array|object|string, cdn_url: string, cdn_exclude: array|object|string
zinn-cache/warm-cache
zinn-cache-warm-cache
Warm the cache (Pro)
Starts visiting every page in the sitemaps in the background, so visitors get cached pages. Its progress is reported separately while it runs.
Pro editionPOST …/abilities/zinn-cache/warm-cache/runmanage_optionsnone

WP-CLI commands

Run these on the server with WP-CLI. Each command checks the same permissions as the plugin's screens; the examples are taken from the plugin's own help text.

CommandWhat it doesEdition
wp zinn-cache purge all
wp zinn-cache purge all
Purge every cached page.Free edition
wp zinn-cache purge post
<id>...
wp zinn-cache purge post 42
Purge a post's pages and the listings it appears on (home page, archives, feeds).Free edition
wp zinn-cache purge url
<url>...
wp zinn-cache purge url https://example.com/ /pricing/
Purge the cached pages at these URLs.Free edition
wp zinn-cache refresh
<action>
wp zinn-cache refresh status
Start, stop or show the paced refresh (what replaces "purge everything" after an update).Free edition
wp zinn-cache server detect
wp zinn-cache server detect
Check which caches answer in front of the site (nginx, Varnish, Apache, LiteSpeed, Cloudflare).Free edition
wp zinn-cache server drain
wp zinn-cache server drain
Send the queued server-cache purges now instead of waiting for WP-Cron.Free edition
wp zinn-cache status
[--format=<format>]
wp zinn-cache status --format=json
Report the object cache's state.Free edition

Actions and filters

Every hook the plugin offers, with the description from its source code. Filters change a value; actions let you run code at a moment; entry points are actions you fire to ask the plugin to do something.

HookKindWhat it doesParametersEdition
zinn_cache_control_headerFilterFilters the cache-control value sent to LiteSpeed for a cacheable page.string $value, int $ttlFree edition
zinn_cache_fs_loadedActionFires once the licensing SDK has loaded, before the rest of Zinn® Cache. Hook here to talk to `zinn_cache_fs()`.noneFree edition
zinn_cache_link_scan_post_typesFilterPost types the scan covers.noneFree edition
zinn_cache_mcp_abilitiesActionFires after Zinn® Cache registers its abilities: Zinn® Cache Pro adds its own here.noneFree edition
zinn_cache_post_change_tagsFilterFilters the cache tags purged when a post changes.string[] $tags, int $post_id, string $post_typeFree edition
zinn_cache_purge_allActionClear everything, from the Tools row.noneFree edition
zinn_cache_purge_hostsFilterFilters the hostnames purges may name (for a site served on more than one domain).string[] $hostsFree edition
zinn_cache_purge_on_seo_changeFilterFilters whether a change made in Zinn® SEO purges the pages it changed.bool $onFree edition
zinn_cache_purge_planEntry point (you fire it)Purge exactly what a plan names: `do_action( 'zinn_cache_purge_plan', array( 'urls' => …, 'tags' => …, 'purge_all' => … ) )`.noneFree edition
zinn_cache_purgedActionFires after the plugin has dispatched a cache purge.array{purge_all:bool,urls:string[],tags:string[]} $planFree edition
zinn_cache_purged_allActionFires after a full purge of the page cache was requested.string $reasonFree edition
zinn_cache_refresh_armedActionFires when a paced refresh starts.string $reasonFree edition
zinn_cache_refresh_finishedActionFires when a paced refresh has reached the end of the site.int $pagesFree edition
zinn_cache_refresh_guardFilterFilters whether the refresh should pause this minute (a host's own load guard).string $reasonFree edition
zinn_cache_refresh_urlsFilterFilters the addresses a refresh batch purges — add each page's other language addresses here, for example.string[] $urlsFree edition
zinn_cache_refreshed_urlsActionFires after a refresh batch was purged (Zinn® Cache Pro warms these pages again).string[] $urlsFree edition
zinn_cache_request_cacheableFilterFilters whether the current front-end request may be served from the page cache.bool $cacheableFree edition
zinn_cache_status_rowsFilterFilters the rows of the status screen's "What is caching this site" table.array<int,array{0:string,1:string}> $rows, array<string,mixed> $reportFree edition
zinn_cache_ttlFilterFilters how long the current page is cached for, in seconds.int $ttlFree edition