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.
Endpoints
MCP over HTTP (streamable)
https://example.com/wp-json/zinn-cache/v1/mcpMCP 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-cacheREST: run an ability
/wp-json/wp-abilities/v1/abilities/<name>/runAuthentication 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.
| Ability | What it does | Edition | REST | Permission | Parameters |
|---|---|---|---|---|---|
zinn-cache/clean-databasezinn-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 edition | POST …/abilities/zinn-cache/clean-database/run | manage_options | none |
zinn-cache/convert-imageszinn-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 edition | POST …/abilities/zinn-cache/convert-images/run | manage_options | none |
zinn-cache/detect-cache-layerszinn-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 edition | POST …/abilities/zinn-cache/detect-cache-layers/run | manage_options (the REST route's own check) | sample: boolean |
zinn-cache/get-cache-analyticszinn-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 edition | GET …/abilities/zinn-cache/get-cache-analytics/run | manage_options | hours: integer |
zinn-cache/get-cache-layerszinn-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 edition | GET …/abilities/zinn-cache/get-cache-layers/run | manage_options (the REST route's own check) | none |
zinn-cache/get-diagnosticszinn-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 edition | GET …/abilities/zinn-cache/get-diagnostics/run | manage_options | none |
zinn-cache/get-image-progresszinn-cache-get-image-progress | Read the image conversion progress (Pro) Returns how far converting (or removing) the images has got. | Pro edition | GET …/abilities/zinn-cache/get-image-progress/run | manage_options | none |
zinn-cache/get-pro-settingszinn-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 edition | GET …/abilities/zinn-cache/get-pro-settings/run | manage_options | none |
zinn-cache/get-settingszinn-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 edition | GET …/abilities/zinn-cache/get-settings/run | manage_options | none |
zinn-cache/get-slow-querieszinn-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 edition | GET …/abilities/zinn-cache/get-slow-queries/run | manage_options | none |
zinn-cache/get-statuszinn-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 edition | GET …/abilities/zinn-cache/get-status/run | manage_options | none |
zinn-cache/get-warmup-progresszinn-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 edition | GET …/abilities/zinn-cache/get-warmup-progress/run | manage_options | none |
zinn-cache/preview-database-cleanupzinn-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 edition | GET …/abilities/zinn-cache/preview-database-cleanup/run | manage_options | none |
zinn-cache/purgezinn-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 edition | POST …/abilities/zinn-cache/purge/run | manage_options (the REST route's own check) | all: boolean, urls: array, tags: array |
zinn-cache/purge-urlszinn-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 edition | POST …/abilities/zinn-cache/purge-urls/run | manage_options (the REST route's own check) | urls: array (required) |
zinn-cache/refresh-cachezinn-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 edition | POST …/abilities/zinn-cache/refresh-cache/run | manage_options (the REST route's own check) | action: start|stop (required) |
zinn-cache/remove-converted-imageszinn-cache-remove-converted-images | Remove all converted images (Pro) Deletes every converted copy of the images in the background; the originals stay. | Pro edition | POST …/abilities/zinn-cache/remove-converted-images/run | manage_options | none |
zinn-cache/reset-settingszinn-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 edition | POST …/abilities/zinn-cache/reset-settings/run | manage_options | none |
zinn-cache/reset-slow-querieszinn-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 edition | POST …/abilities/zinn-cache/reset-slow-queries/run | manage_options | none |
zinn-cache/update-pro-settingszinn-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 edition | POST …/abilities/zinn-cache/update-pro-settings/run | manage_options | settings: object (required) |
zinn-cache/update-settingszinn-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 edition | POST …/abilities/zinn-cache/update-settings/run | manage_options | lscache_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-cachezinn-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 edition | POST …/abilities/zinn-cache/warm-cache/run | manage_options | none |
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.
| Command | What it does | Edition |
|---|---|---|
wp zinn-cache purge allwp 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 detectwp zinn-cache server detect | Check which caches answer in front of the site (nginx, Varnish, Apache, LiteSpeed, Cloudflare). | Free edition |
wp zinn-cache server drainwp 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.
| Hook | Kind | What it does | Parameters | Edition |
|---|---|---|---|---|
zinn_cache_control_header | Filter | Filters the cache-control value sent to LiteSpeed for a cacheable page. | string $value, int $ttl | Free edition |
zinn_cache_fs_loaded | Action | Fires once the licensing SDK has loaded, before the rest of Zinn® Cache. Hook here to talk to `zinn_cache_fs()`. | none | Free edition |
zinn_cache_link_scan_post_types | Filter | Post types the scan covers. | none | Free edition |
zinn_cache_mcp_abilities | Action | Fires after Zinn® Cache registers its abilities: Zinn® Cache Pro adds its own here. | none | Free edition |
zinn_cache_post_change_tags | Filter | Filters the cache tags purged when a post changes. | string[] $tags, int $post_id, string $post_type | Free edition |
zinn_cache_purge_all | Action | Clear everything, from the Tools row. | none | Free edition |
zinn_cache_purge_hosts | Filter | Filters the hostnames purges may name (for a site served on more than one domain). | string[] $hosts | Free edition |
zinn_cache_purge_on_seo_change | Filter | Filters whether a change made in Zinn® SEO purges the pages it changed. | bool $on | Free edition |
zinn_cache_purge_plan | Entry point (you fire it) | Purge exactly what a plan names: `do_action( 'zinn_cache_purge_plan', array( 'urls' => …, 'tags' => …, 'purge_all' => … ) )`. | none | Free edition |
zinn_cache_purged | Action | Fires after the plugin has dispatched a cache purge. | array{purge_all:bool,urls:string[],tags:string[]} $plan | Free edition |
zinn_cache_purged_all | Action | Fires after a full purge of the page cache was requested. | string $reason | Free edition |
zinn_cache_refresh_armed | Action | Fires when a paced refresh starts. | string $reason | Free edition |
zinn_cache_refresh_finished | Action | Fires when a paced refresh has reached the end of the site. | int $pages | Free edition |
zinn_cache_refresh_guard | Filter | Filters whether the refresh should pause this minute (a host's own load guard). | string $reason | Free edition |
zinn_cache_refresh_urls | Filter | Filters the addresses a refresh batch purges — add each page's other language addresses here, for example. | string[] $urls | Free edition |
zinn_cache_refreshed_urls | Action | Fires after a refresh batch was purged (Zinn® Cache Pro warms these pages again). | string[] $urls | Free edition |
zinn_cache_request_cacheable | Filter | Filters whether the current front-end request may be served from the page cache. | bool $cacheable | Free edition |
zinn_cache_status_rows | Filter | Filters the rows of the status screen's "What is caching this site" table. | array<int,array{0:string,1:string}> $rows, array<string,mixed> $report | Free edition |
zinn_cache_ttl | Filter | Filters how long the current page is cached for, in seconds. | int $ttl | Free edition |