diagnose-rest-cache
Skill by strapi-community
Diagnoses why Strapi REST Cache skips caching, serves stale content, or caches the wrong responses. Walks through X-Cache header checks, HITPASS and MISS causes, and configuration fixes. Written for developers running the Strapi REST Cache plugin.
Install diagnose-rest-cache
Built from the published package, never by AI.
git clone --depth 1 https://github.com/strapi-community/plugin-rest-cache /tmp/plugin-rest-cache && mkdir -p ~/.claude/skills && cp -r /tmp/plugin-rest-cache/plugins/rest-cache-helper/skills/diagnose-rest-cache ~/.claude/skills/diagnose-rest-cacheRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/strapi-community/plugin-rest-cache /tmp/plugin-rest-cache && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/plugin-rest-cache/plugins/rest-cache-helper/skills/diagnose-rest-cache ~/.gemini/antigravity-cli/skills/diagnose-rest-cacheAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install diagnose-rest-cache in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant through diagnosing why Strapi REST Cache is not caching, serves stale content, or caches the wrong responses. It starts by enabling the X-Cache header and requesting the failing route twice with curl. It then branches on HITPASS, MISS, or a missing header, and covers stale content, expiry settings, cross-user data leaks, and multi-instance inconsistency.
The guide explains that HITPASS is often a false alarm, since a browser logged into the admin panel sends a cookie on every request. It lists the response conditions that stop caching, such as Set-Cookie headers and Cache-Control no-store or private. It also notes that maxAge is in milliseconds and that the memory provider is per process, so Redis is recommended for multiple instances. It is aimed at developers running Strapi with the REST Cache plugin.
Written from the project's SKILL.md and checked against it.
What it can do
- Read the X-Cache headerExplains enabling enableXCacheHeaders and requesting a route twice with curl.
- Diagnose HITPASSIdentifies bypasses caused by authorization or cookie headers, such as browser admin sessions.
- Diagnose MISS responsesLists response conditions that stop the plugin from storing a response.
- Find missing cache routesChecks strategy.contentTypes and custom route paths, including the API prefix.
- Debug route registrationUses strategy.debug or DEBUG output to find routes that could not be matched.
- Investigate stale contentCovers document service invalidation and the enableDocumentServiceMiddleware setting.
- Fix expiry settingsExplains that maxAge is set in milliseconds, a common configuration mistake.
- Handle cross-user data leaksGives urgent mitigation steps when one caller sees another caller's data.
- Diagnose multi-instance issuesExplains the per-process memory provider and recommends the Redis provider.
- Prepare a bug reportLists the versions, config, X-Cache value and debug output to collect before opening an issue.
What you need
- Strapi with the REST Cache plugin
- curl for testing responses
- Redis provider for multi-instance deployments
Try asking
- Why is my Strapi articles route showing X-Cache HITPASS?
- Check why my REST Cache content stays stale after an edit.
- Find out why a custom route is not registered in REST Cache.
Good to know
- Changes made directly in the database are not observed, so a manual purge is needed.
- enableXCacheHeaders is off by default.
- The memory provider is per process and does not share purges across instances.
- Authenticated caching requires turning off hitpass and enabling keys.useAuth.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/rest-cache-helper/skills/diagnose-rest-cache/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB
Alternatives to diagnose-rest-cache
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
diagnose-rest-cache: common questions
Why does X-Cache show HITPASS in my browser?
The default hitpass skips requests that carry an authorization or cookie header. A browser logged into the admin panel sends a cookie on every request, so retest with curl or a private window.
Why is my Strapi REST response never cached?
The content type must be listed in strategy.contentTypes, and custom routes must be listed with the path as Strapi registered it, including the /api prefix.
What should I do if one user sees another user's data?
Treat it as urgent. Re-enable hitpass for that content type and purge the cache, then read the authenticated-caching recipe before re-enabling.
How do I install diagnose-rest-cache?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is diagnose-rest-cache free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is diagnose-rest-cache safe to use?
It scores 73 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to diagnose-rest-cache?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
