responsecache-development
Skill by spatie
Caches entire HTTP responses in Laravel applications using spatie/laravel-responsecache. It covers standard and flexible stale-while-revalidate caching, cache profiles, replacers and selective clearing. Built for Laravel developers who want to speed up routes that serve the same output.
Install responsecache-development
Built from the published package, never by AI.
git clone --depth 1 https://github.com/spatie/laravel-responsecache /tmp/laravel-responsecache && mkdir -p ~/.claude/skills && cp -r /tmp/laravel-responsecache/resources/boost/skills/responsecache-development ~/.claude/skills/responsecache-developmentRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install responsecache-development in Claude Code
git clone --depth 1 https://github.com/spatie/laravel-responsecache /tmp/laravel-responsecache && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/laravel-responsecache/resources/boost/skills/responsecache-development ~/.gemini/antigravity-cli/skills/responsecache-developmentAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install responsecache-development 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 HTTP response caching with spatie/laravel-responsecache in a Laravel application. It covers adding the CacheResponse and FlexibleCacheResponse middleware to routes, using PHP attributes on controller methods, and preventing caching with the DoNotCacheResponse middleware or the #[NoCache] attribute. It also explains clearing cached responses by URL, by tags, or with the responsecache:clear Artisan command.
The skill also describes customizing cache behavior. Developers can write a custom cache profile, a replacer that swaps dynamic content such as CSRF tokens or user names, or a custom request hasher for cache keys. It lists the events the package dispatches and the main options in config/responsecache.php. It is aimed at Laravel developers who build or maintain response caching in their applications.
Written from the project's SKILL.md and checked against it.
What it can do
- Standard response cachingCaches routes with CacheResponse, using the default lifetime or a custom one with optional tags.
- Flexible cachingUses FlexibleCacheResponse to serve stale content while refreshing it in the background.
- Attribute-based controlApplies #[Cache], #[FlexibleCache] and #[NoCache] to individual controller methods.
- Preventing cachingUses the DoNotCacheResponse middleware to keep a route's responses out of the cache.
- Selective clearingClears cached responses by tags, forgets specific URLs, or uses a fluent selectCachedItems API.
- Artisan clearingClears the response cache from the command line with php artisan responsecache:clear.
- Cache profilesImplements the CacheProfile interface to decide which requests and responses get cached.
- ReplacersSwaps dynamic content such as CSRF tokens in cached responses so they stay valid.
- Custom hashersImplements RequestHasher to change how cache keys are generated.
- Cache eventsDispatches hit, miss, clearing, cleared and clearing-failed events for the response cache.
What you need
- A Laravel application
- The spatie/laravel-responsecache package
- A cache driver that supports tags, for tag-based clearing
Try asking
- Cache the posts index route for 10 minutes and tag it as posts.
- Add a custom replacer that swaps the user name in cached responses.
- Clear cached responses tagged posts and forget the /posts URL.
Good to know
- Tag-based clearing requires a cache driver that supports tags.
- Attributes work only when CacheResponse or FlexibleCacheResponse middleware is applied to the route.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: resources/boost/skills/responsecache-development/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB
Alternatives to responsecache-development
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
responsecache-development: common questions
Does spatie/laravel-responsecache support stale-while-revalidate caching?
Yes. FlexibleCacheResponse serves stale content while a background refresh happens within the grace period after the lifetime ends.
How do I stop a Laravel route from being cached?
Apply the DoNotCacheResponse middleware to the route, or add the #[NoCache] attribute to the controller method.
Can I clear only some cached responses?
Yes. ResponseCache::clear accepts tags, forget accepts URLs and tags, and selectCachedItems offers a fluent API. Tag clearing needs a tag-supporting cache driver.
How do I install responsecache-development?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is responsecache-development free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is responsecache-development safe to use?
It scores 86 of 100. Grades: maintenance A, licence A, quality A. 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 responsecache-development?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
