# Caching

> HTTP caching, service workers, cache invalidation, and CDN configuration.

- Skill: `majiayu000/caching-3` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/caching-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/caching-3/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/caching-3

---


# Caching Skill

Expert assistance for caching strategies.

## Capabilities

- Configure HTTP caching
- Implement service workers
- Set up CDN caching
- Handle cache invalidation
- Design caching architecture

## HTTP Cache Headers

```typescript
// Immutable assets
headers['Cache-Control'] = 'public, max-age=31536000, immutable';

// Dynamic content
headers['Cache-Control'] = 'private, no-cache, must-revalidate';

// Stale-while-revalidate
headers['Cache-Control'] = 'public, max-age=60, stale-while-revalidate=300';
```

## Service Worker

```javascript
self.addEventListener('fetch', (event) => {
  event.respondWith(
    caches.match(event.request).then((response) => {
      return response || fetch(event.request);
    })
  );
});
```

## Target Processes

- caching-strategy
- performance-optimization
- pwa-development

