一键导入
caching
Caching discipline — invalidation, TTLs, stampede protection, layer choice. Load before adding any cache; caching is a bug you choose deliberately.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Caching discipline — invalidation, TTLs, stampede protection, layer choice. Load before adding any cache; caching is a bug you choose deliberately.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Context engineering — memory navigation, textual graph traversal, progressive disclosure, recovery. Load when assembling context for a task or when lost.
Implementation-side security discipline — headers, dependencies, secrets, authz. Load for hardening work (sec-ops domain).
Commit conventions, branching, anchors in messages, and the git safety rules. Load for any git operation beyond status/diff.
Anti-generic-AI design discipline — bans, tells, and the slop test. Load for ANY new UI surface or visual redesign. Inspired by Impeccable (Apache 2.0).
Motion & animation discipline — purpose, performance, reduced-motion. Load when work involves animation, transitions or scroll effects.
Microcopy discipline — buttons, errors, empty/loading/success states, alt text. Voice and tone come from the project's memory, not from this skill.
| name | caching |
| description | Caching discipline — invalidation, TTLs, stampede protection, layer choice. Load before adding any cache; caching is a bug you choose deliberately. |
Cache tech from memory-long §stack. A cache is deliberately serving stale data for speed — every decision below is about controlling how wrong you're willing to be.
performance-cwv for the front-side counterpart).user:{id}:orders), so write paths can target them — regex-sweeping a cache is a smell.Popular key expires → N requests hit the source simultaneously. Pick one: request coalescing/locking (one refills, others wait) · probabilistic early refresh · stale-while-revalidate. Default: SWR where user-facing, locking where the source is fragile.
In-process (fastest, per-instance drift) → shared/distributed (consistent, network hop) → CDN/edge (for anonymous/static). Cache as close to the consumer as staleness tolerance allows. Never cache: authz decisions, feature flags mid-request, anything with per-user secrets in a shared layer.
Hit ratio and staleness metrics visible (see observability) · test the failure modes: cold cache, miss storm, invalidation race · report states the staleness contract explicitly.