Implement Caching
Implement comprehensive multi-level API caching strategies with Redis, CDN,
- Type
- Slash Command
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Version
- 2.0.0
What Implement Caching is
Implement Caching is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”
A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.
Implement Caching gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.
How to install Implement Caching
Claude Code
- Download implement-caching.md from the repository.
- Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
- Run it by typing / followed by its name.
Claude Cowork
- Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
- In Customize → Skills, click +, then upload the ZIP.
- Run it from any task with / and the skill name.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/api-development/api-cache-manager/commands/implement-caching.md, shared under the repository's MIT license. Read the full file on GitHub.
Creates comprehensive multi-level caching strategies to dramatically improve API performance, reduce database load, and enhance user experience. Implements Redis for server-side caching, CDN integration for edge caching, and proper HTTP cache headers for client-side optimization.
When to Use
Use this command when:
- API response times exceed acceptable thresholds (>200ms)
- Database queries are repetitive and expensive
- Static or semi-static content dominates API responses
- High traffic causes server strain and increased costs
- Geographic distribution requires edge caching
- Rate limiting needs efficient request counting
- Session data requires fast access across servers
Do NOT use this command for:
- Real-time data that changes every request
- User-specific sensitive data (without proper cache isolation)
- APIs with complex invalidation dependencies
- Small-scale applications where caching adds unnecessary complexity
Prerequisites
Before running this command, ensure:
- API endpoints are identified and categorized by cache lifetime
- Redis or Memcached is available (or can be provisioned)
- CDN service is configured (CloudFlare, Fastly, or AWS CloudFront)
- Cache key strategy is defined
- Monitoring tools are ready to track cache performance
Process
Step 1: Analyze API Patterns
The command examines your API to determine optimal caching strategies:
- Identifies read-heavy endpoints suitable for caching
- Categorizes data by volatility (static, semi-dynamic, dynamic)
- Analyzes request patterns and frequency
- Determines appropriate cache TTL values
- Maps data dependencies for invalidation
Step 2: Implement Server-Side Caching
Sets up Redis-based caching with intelligent patterns:
- Cache-aside pattern for on-demand caching
- Write-through for immediate cache updates
- Write-behind for asynchronous cache population
- Distributed caching for horizontal scaling
- Cache warming for critical data
Step 3: Configure HTTP Cache Headers
Implements proper HTTP caching directives:
- Cache-Control headers with appropriate max-age
- ETag generation for conditional requests
- Vary headers for content negotiation
- Surrogate-Control for CDN-specific behavior
- Stale-while-revalidate for improved perceived performance
Step 4: Integrate CDN Caching
Configures edge caching for global distribution:
- Cache rules based on URL patterns
- Geographic cache distribution
- Cache purging API integration
- Origin shield configuration
- Custom cache keys for variants
Step 5: Implement Cache Invalidation
Creates sophisticated invalidation strategies:
- Tag-based invalidation for related content
- Event-driven cache clearing
- Time-based expiration with jitter
- Cascade invalidation for dependent data
- Soft purging with grace periods
Output Format
The command generates a complete caching implementation:
api-caching/
├── src/
│ ├── cache/
│ │ ├── redis-client.js
│ │ ├── cache-middleware.js
│ │ ├── cache-strategies.js
│ │ └── invalidation-service.js
│ ├── middleware/
│ │ ├── http-cache-headers.js
│ │ └── cdn-integration.js
│ └── utils/
│ ├── cache-key-generator.js
│ └── cache-metrics.js
├── config/
│ ├── cache-config.json
│ ├── redis.config.js
│ └── cdn-rules.json
├── tests/
…Examples
Example 1: E-commerce Product API with Redis
Scenario: High-traffic product catalog requiring sub-100ms response times
Generated Redis Implementation:
// cache/redis-client.js
import Redis from 'ioredis';
import { promisify } from 'util';
class CacheManager {
constructor() {
this.client = new Redis({
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
password: process.env.REDIS_PASSWORD,
retryStrategy: (times) => Math.min(times * 50, 2000),
enableOfflineQueue: false
});
this.defaultTTL = 3600; // 1 hour default
this.client.on('error', this.handleError);
}
…Example 2: CDN Integration with Cache Purging
Scenario: Global content delivery with CloudFlare integration
Generated CDN Configuration:
// cdn-integration.js
class CDNManager {
constructor(config) {
this.zoneId = config.cloudflareZoneId;
this.apiToken = config.cloudflareApiToken;
this.baseUrl = 'https://api.cloudflare.com/client/v4';
}
// Set CDN cache headers
setCacheHeaders(res, options = {}) {
const {
maxAge = 3600,
sMaxAge = 86400,
staleWhileRevalidate = 60,
staleIfError = 3600,
mustRevalidate = false,
public = true
} = options;
… Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Implement Caching?
Implement Caching is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Implement comprehensive multi-level API caching strategies with Redis, CDN,
How do I install Implement Caching in Claude Code?
Download implement-caching.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.
Can I use Implement Caching in Claude Cowork?
Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.
Is Implement Caching safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Reporting Narrative Compiles specialist agent outputs into tiered analytics narratives (mini pulse, daily brief, full deep-dive) in an advisory business voice — never touches raw data. Use when generating a polished analytics report for console, email, or Slack. Trigger with \"generate analytics report\", \"compile analytics brief\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Resource Usage Tracker Track and optimize resource usage across the stack Plugin · jeremylongshore/tons-of-skills-marketplace
- Response Time Tracker Track and optimize application response times Plugin · jeremylongshore/tons-of-skills-marketplace
- Resp Writes incident response playbooks, containment runbooks, and post-incident reviews following the PICERL framework — contain first, preserve evidence, never blame. Use when building IR readiness or handling an active incident. Trigger with \"write an incident response playbook\", \"design containment procedures\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Implement Error Handling Implement standardized API error handling Slash Command · jeremylongshore/tons-of-skills-marketplace
- Implement Batch Processing Implement high-performance batch API operations with job queues, progress Slash Command · jeremylongshore/tons-of-skills-marketplace
- Incident P0 Database Down Emergency response procedure for SOP-201 P0 - Database Down (Critical) Slash Command · jeremylongshore/tons-of-skills-marketplace
- Helm Chart Generate Helm charts for Kubernetes applications Slash Command · jeremylongshore/tons-of-skills-marketplace