/rest-cache-helper:configure-rest-cachefrom rest-cache-helper
Guides configuring Strapi REST Cache plugin: choosing memory vs Redis providers, setting cache keys for authenticated or per-locale responses, and tuning maxAge for specific routes.
Ships in rest-cache-helper. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Do not write a configuration before establishing the four things below. Most bad cache configurations are bad because one of them was assumed.
maxAge is a backstop for
changes nothing observed, not the primary mechanism.Ask the user these if the answers are not already evident from their project.
Each of these is a complete, copy-pasteable configuration with the trade-offs written out. Prefer sending the user to the matching one over inventing a config from scratch.
| Situation | Recipe |
|---|---|
| Public, read-heavy content API | public-content |
| Per-user or token-authenticated responses | authenticated |
| Several instances behind a load balancer | multi-instance |
| Only a few slow endpoints | expensive-routes |
| i18n, or heavy filter/pagination/populate use | i18n-and-query |
| Preview or draft workflows | previews-drafts |
Full option reference: https://strapi-community.github.io/plugin-rest-cache/guide/reference/config.html
Durations are milliseconds. maxAge: 3600 is 3.6 seconds. One hour is
3600000. Write the value with a comment saying what it is in human units.
Never set hitpass: false without keys.useAuth: true. Together they
cache authenticated traffic keyed per caller. hitpass: false alone means two
callers authorised for the same route share one entry, and whoever misses first
decides what everybody else sees. The server logs a warning at boot if you do
this, and the admin panel flags the content type — but by then it is already
serving.
Custom route paths must include the API prefix, exactly as Strapi
registered them: /api/articles/slug/:slug.
Match keysPrefix to your Redis keyPrefix if the connection sets one.
A mismatch means the plugin enumerates nothing, and every purge silently does
nothing.
Have the user turn on enableXCacheHeaders, then:
curl -sI http://localhost:1337/api/articles | grep -i x-cache # MISS
curl -sI http://localhost:1337/api/articles | grep -i x-cache # HIT
Then edit that content in the admin panel and request again — it should be
MISS, proving invalidation works.
HITPASS means the request bypassed the cache; with the default hitpass a
browser session will always do that. Test with curl.
If any of that does not behave, switch to the diagnose-rest-cache skill.
Both ./config/plugins.js and ./config/plugins.ts are supported. Match
whichever the project already uses, and keep the plugin's block under the
rest-cache key with everything inside config.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub strapi-community/plugin-rest-cache --plugin rest-cache-helperOther plugins' skills for the same job