Agent skill

Caching Strategy Selector

by revfactory in revfactory/harness-100

캐싱 전략(Cache Aside, Write Through, Write Behind 등) 선택 매트릭스와 Redis/Memcached 활용, TTL 설계, 캐시 무효화 패턴 가이드.

Apache-2.0Auto-check passedDatabases

Install Caching Strategy Selector

skills CLI
$ npx skills add revfactory/harness-100 --skill caching-strategy-selector -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install revfactory/harness-100 caching-strategy-selector --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ko/29-performance-optimizer/.claude/skills/caching-strategy-selector .claude/skills/caching-strategy-selector && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
caching-strategy-selector
GitHub stars
1.3k
Token cost
~925 tokens
SKILL.md length
171 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

캐싱 전략(Cache Aside, Write Through, Write Behind 등) 선택 매트릭스와 Redis/Memcached 활용, TTL 설계, 캐시 무효화 패턴 가이드.

  • Works in 6 steps: Cache Aside (Lazy Loading) → Write Through → Write Behind (Write Back) → …
  • Tasks that involve Caching
  • SKILL.md covers 캐싱 전략 비교, 캐시 무효화 패턴, 캐시 문제 해결 and 캐시 계층 설계, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Caching Strategy Selector is an agent skill from revfactory/harness-100. 캐싱 전략(Cache Aside, Write Through, Write Behind 등) 선택 매트릭스와 Redis/Memcached 활용, TTL 설계, 캐시 무효화 패턴 가이드. '캐싱 전략', 'Redis', '캐시 무효화', 'TTL', 'Cache Aside', 'Write Through', 'CDN 캐싱', '캐시 스탬피드' 등 캐싱 설계 시 이 스킬을 사용한다. optimization-engineer의 캐싱 설계 역량을 강화한다. 단, 전체 성능 프로파일링이나 벤치마크는 이 스킬의 범위가 아니다.

Its SKILL.md is about 930 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Caching. It works with Redis. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Caching

Example prompts

  • “Cache Aside”
  • “Write Through”
  • “CDN 캐싱”
  • “/caching-strategy-selector”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Cache Aside (Lazy Loading)
  2. Write Through
  3. Write Behind (Write Back)
  4. TTL (Time-To-Live)
  5. Event-Based Invalidation
  6. Version-Based

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Caching Strategy Selector loads about 925 tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 171 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~925

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 171 words, ~925 tokens.

Download SKILL.mdSave it as .claude/skills/caching-strategy-selector/SKILL.md (or your agent's skills folder).
name
caching-strategy-selector
description
캐싱 전략(Cache Aside, Write Through, Write Behind 등) 선택 매트릭스와 Redis/Memcached 활용, TTL 설계, 캐시 무효화 패턴 가이드. '캐싱 전략', 'Redis', '캐시 무효화', 'TTL', 'Cache Aside', 'Write Through', 'CDN 캐싱', '캐시 스탬피드' 등 캐싱 설계 시 이 스킬을 사용한다. optimization-engineer의 캐싱 설계 역량을 강화한다. 단, 전체 성능 프로파일링이나 벤치마크는 이 스킬의 범위가 아니다.

Caching Strategy Selector — 캐싱 전략 선택 가이드

적절한 캐싱 전략을 선택하고 효과적으로 구현하는 방법론.

캐싱 전략 비교

1. Cache Aside (Lazy Loading)
읽기: App → Cache 확인 → 미스 → DB 조회 → Cache 저장 → 반환
쓰기: App → DB 저장 → Cache 무효화(삭제)
장점단점
가장 범용적첫 요청은 항상 미스
캐시 장애 시 DB 폴백읽기-수정-쓰기 경쟁 조건
필요한 데이터만 캐시데이터 불일치 윈도우 존재
2. Write Through
쓰기: App → Cache 저장 → DB 저장 (동기)
읽기: App → Cache 확인 → 항상 히트
장점단점
읽기-쓰기 일관성쓰기 지연 증가
캐시 항상 최신사용하지 않는 데이터도 캐시
3. Write Behind (Write Back)
쓰기: App → Cache 저장 → 비동기 배치로 DB 저장
읽기: App → Cache 확인 → 항상 히트
장점단점
쓰기 성능 극대화캐시 장애 시 데이터 유실
DB 부하 평탄화구현 복잡
전략 선택 매트릭스
요구사항Cache AsideWrite ThroughWrite Behind
읽기 집중★★★★★★★
쓰기 집중★★★★★
일관성 중요★★★★★★
성능 중요★★★★★★
구현 단순★★★★★★
데이터 유실 불가★★★★★★★

캐시 무효화 패턴

1. TTL (Time-To-Live)
python
# TTL 설정 가이드
CACHE_TTL = {
    "user_profile": 300,      # 5분 — 자주 변경되지 않음
    "product_list": 60,       # 1분 — 중간 변경 빈도
    "stock_count": 10,        # 10초 — 자주 변경
    "config": 3600,           # 1시간 — 거의 변경 안 됨
    "session": 86400,         # 24시간 — 세션 수명
}

# Jitter 추가 (캐시 스탬피드 방지)
import random
ttl = base_ttl + random.randint(0, base_ttl // 10)
2. Event-Based Invalidation
python
# 이벤트 기반 무효화
@event_handler("user.updated")
def invalidate_user_cache(event):
    cache.delete(f"user:{event.user_id}")
    cache.delete(f"user_profile:{event.user_id}")
    # 관련 목록 캐시도 무효화
    cache.delete("user_list:page:*")
3. Version-Based
python
# 버전 키로 한꺼번에 무효화
version = cache.get("product_version") or 1
key = f"product_list:v{version}"
# 무효화: 버전만 증가
cache.incr("product_version")

캐시 문제 해결

Cache Stampede (Thundering Herd)
문제: 캐시 만료 시 동시 요청이 모두 DB에 접근
해결:

1. Mutex Lock
   if cache.miss(key):
       if cache.lock(key + ":lock", timeout=5):
           result = db.query()
           cache.set(key, result, ttl)
           cache.unlock(key + ":lock")
       else:
           wait_and_retry()

2. Stale-While-Revalidate
   cache.set(key, data, ttl=300, stale_ttl=600)
   # TTL 만료 후에도 stale 데이터 반환하면서 백그라운드 갱신

3. Probabilistic Early Expiry
   delta = ttl * beta * log(random())
   if now() - fetched_at > ttl + delta:
       refresh()
Cache Penetration
문제: 존재하지 않는 키 반복 요청 → 매번 DB 접근
해결:
1. 블룸 필터: 존재 가능성 사전 체크
2. 빈 결과 캐싱: cache.set(key, NULL, ttl=60)
3. 요청 검증: 유효하지 않은 키 사전 차단
Cache Avalanche
문제: 대량 캐시가 동시 만료 → DB 과부하
해결:
1. TTL 분산: TTL + random jitter
2. 단계적 만료: 중요도별 다른 TTL
3. 예열(Warm-up): 배포 시 캐시 사전 적재

캐시 계층 설계

L1: 로컬 캐시 (인프로세스)
    ├── 용량: ~100MB
    ├── 속도: ~0.1ms
    └── 적합: 설정, 상수, 빈번한 읽기

L2: 분산 캐시 (Redis/Memcached)
    ├── 용량: ~10GB
    ├── 속도: ~1ms
    └── 적합: 세션, 프로필, 목록

L3: CDN 캐시 (CloudFront/Cloudflare)
    ├── 용량: 무제한
    ├── 속도: 엣지에서 ~5ms
    └── 적합: 정적 자산, API 응답

L4: 브라우저 캐시
    ├── Cache-Control: max-age, stale-while-revalidate
    └── ETag / Last-Modified

Redis 데이터 구조 선택

구조적합예시
String단순 키-값세션, 설정, 카운터
Hash객체 필드사용자 프로필
List최근 목록최근 본 상품 (LPUSH + LTRIM)
Set고유 집합온라인 사용자
Sorted Set랭킹리더보드, 트렌딩
HyperLogLog근사 카운팅UV 카운트

© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in ko/29-performance-optimizer/.claude/skills/caching-strategy-selector of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Caching Strategy Selector next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Caching Strategy Selector compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Caching Strategy Selector this skillrevfactory/harness-1001.3k—~925Automated safety check: PassApache-2.0
Configure REST Cachestrapi-community/plugin-rest-cache155—~1.1kAutomated safety check: PassMIT
Commandkit Cacheneplexlabs/commandkit165—~506Automated safety check: PassMIT
Redissickn33/agentic-awesome-skills47k2 repos~2.6kAutomated safety check: NotesMIT
Scalingericrisco/rsc-harness174—~2.8kAutomated safety check: PassMIT
Redis Coreredis/agent-skills1652 repos~759Automated safety check: PassMIT

Similar skills

  • Configure REST Cache

    strapi-community/plugin-rest-cache

    Choose and write a Strapi REST Cache configuration for a specific use case.

    155 GitHub stars~1.1k tokensUpdated 11 days ago
    DatabasesAuto-check passed
  • Commandkit Cache

    neplexlabs/commandkit

    Implement deterministic caching with @commandkit/cache. An agent skill from neplexlabs/commandkit.

    165 GitHub stars~506 tokensUpdated 12 days ago
    DatabasesAuto-check passed
  • Redis

    sickn33/agentic-awesome-skills

    Configure Redis for caching and data storage. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.6k tokens
    DatabasesAuto-check: notes
  • Scaling

    ericrisco/rsc-harness

    A skill your agent uses when traffic is growing or about to spike and the system bends under concurrency — deciding what to add and in what order (cache, connection pool, async queue, read replica…

    174 GitHub stars~2.8k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Redis Core

    redis/agent-skills

    Official

    Core Redis modeling guidance — choose the right data structure (String, Hash, List, Set, Sorted Set, JSON, Stream, Vector Set) and use consistent colon-separated key names.

    165 GitHub starsUsed in 2 repos~759 tokens
    DatabasesAuto-check passed
  • Redis Connections

    redis/agent-skills

    Official

    Redis client and connection guidance covering connection pooling, multiplexing, pipelining, client-side caching with RESP3, avoiding slow commands (KEYS, SMEMBERS, HGETALL), and tuning socket…

    165 GitHub starsUsed in 1 repo~1.3k tokens
    DatabasesAuto-check passed

More from revfactory/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Works with

Questions about Caching Strategy Selector

What does Caching Strategy Selector do?

캐싱 전략(Cache Aside, Write Through, Write Behind 등) 선택 매트릭스와 Redis/Memcached 활용, TTL 설계, 캐시 무효화 패턴 가이드. Caching Strategy Selector is an agent skill from revfactory/harness-100. 캐싱 전략(Cache Aside, Write Through, Write Behind 등) 선택 매트릭스와 Redis/Memcached 활용, TTL 설계, 캐시 무효화 패턴 가이드.

When should I use Caching Strategy Selector?

Caching Strategy Selector fits situations like: tasks that involve Caching.

How do I install Caching Strategy Selector in Claude Code?

Run `npx skills add revfactory/harness-100 --skill caching-strategy-selector -a claude-code`. Or copy the skill folder (ko/29-performance-optimizer/.claude/skills/caching-strategy-selector in revfactory/harness-100) into .claude/skills/caching-strategy-selector in your project. Claude Code loads it when a task matches its description.

How do I install Caching Strategy Selector in Codex?

Run `npx skills add revfactory/harness-100 --skill caching-strategy-selector -a codex`. Or copy the skill folder (ko/29-performance-optimizer/.claude/skills/caching-strategy-selector in revfactory/harness-100) into .agents/skills/caching-strategy-selector in your project. Codex loads it when a task matches its description.

Can I use Caching Strategy Selector in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add revfactory/harness-100 --skill caching-strategy-selector -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/caching-strategy-selector, .gemini/skills/caching-strategy-selector, .github/skills/caching-strategy-selector and .opencode/skills/caching-strategy-selector in your project.

What does Caching Strategy Selector need to run?

SKILL.md names no scripts, command-line tools or credentials: Caching Strategy Selector is instructions for the agent only. Our summary lists: Python 3.

Does Caching Strategy Selector access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Caching Strategy Selector safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Caching Strategy Selector use?

Caching Strategy Selector is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Caching Strategy Selector use?

About 925 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Caching Strategy Selector?

Skills that share tags, products or a category with Caching Strategy Selector: Configure REST Cache (strapi-community/plugin-rest-cache, 155 stars), Commandkit Cache (neplexlabs/commandkit, 165 stars), Redis (sickn33/agentic-awesome-skills, 47k stars) and Scaling (ericrisco/rsc-harness, 174 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Caching Strategy Selector?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,295 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.

Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.