agentleFS
pahlevikunpahlevikun/levistack/skills/architecture/super-caching/SKILL.md

super-caching

Skill0 starsChanged 19 days agoMITView on GitHub

Super caching: domain router for web (browser, CDN, service worker, HTTP Cache-Control, BFF/API route cache), mobile (on-device, offline, image cache, NSURLSession/OkHttp guidance), server (in-process L1, Redis/Memcached, cache-aside and invalidation), edge/CDN, DB buffer-pool pointers, and optional LLM prompt cache. Covers LRU/LFU/W-TinyLFU, TTL, stampede and hot-key mitigation. Use when choosing or fixing caching in web apps, mobile clients, APIs, distributed cache layers, or CDN headers — not for ORM query-plan cache, pure-function memoization, or CPU cache tuning.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Put hot data closer to the reader.

    line 27
  2. Distinctive:

    Do this first; load only what the task needs.

    line 33
  3. Distinctive:

    Read-heavy origin pain → cache-aside + TTL with jitter + invalidate on write.

    line 67
  4. Very specific:

    Before adding any layer → confirm reads are the bottleneck (back-of-the-envelope).

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Super caching

Put hot data closer to the reader. One router for web, mobile, backend/API, edge/CDN, and related tiers — with shared mechanics in references/core/.

Merged scope: formerly caching, caching-strategies, and caching-strategist.

Step 0: pick a domain

Do this first; load only what the task needs. Index: references/domains/README.md.

If the task touches…DomainLoad
Browser, SPA data libs, service worker, SSR/BFF routeswebweb-app.md + core pack
iOS/Android HTTP, offline, images, local storesmobilemobile-app.md + core pack
Services, workers, Redis, GraphQL loaders, API keys/TTLbackendbackend-api.md + core pack
CDN, purge, edge KV/workers, s-maxageedgeedge-cdn.md + http-caching.md
shared_buffers, InnoDB pool, page evictiondatabase pooldatabase-buffer-pool.md
Prompt prefix cache, semantic answer cacheAI/LLMai-llm.md + backend core as needed

Core pack (patterns, trade-offs, stress, checklist): fundamentals.md. Add depth by topic:

You need…Read
LRU, LFU, ARC, W-TinyLFU, L1 vs Redis, eviction policiescache-mechanisms.md
Invalidation, single-flight, L1+L2, Redis vs Memcacheddeep-dive.md
Redis keys, locks, Lua, pub/sub, pipelinesredis-patterns.md
Cache-Control, ETags, CDN, browserhttp-caching.md
Keys, TTL table, correctness checklistimplementation-checklist.md
AWS, Azure, GCP managed cacheproviders/generic.md, aws, azure, gcp

Package layout

super-caching/
├── SKILL.md
└── references/
    ├── core/          # fundamentals, mechanisms, Redis, HTTP, checklist, providers
    └── domains/       # web, mobile, backend, edge, DB pool, AI — README index

Quick defaults

  • Read-heavy origin pain → cache-aside + TTL with jitter + invalidate on write.
  • Multi-instance → Redis/Memcached; optional L1 on hottest keys only.
  • Public static assets → HTTP/CDN first (http-caching.md).
  • Before adding any layer → confirm reads are the bottleneck (back-of-the-envelope).

Full trade-off tables, failure modes, and apply steps: fundamentals.md.

Related skills

  • super-architecture: decide where the cache layer sits in the system.
  • super-nodejs: build server-side caching in a Node service.
  • super-tech-blueprint: compare Redis, Memcached or a CDN as a stack choice.
  • verify: prove hit rate and latency before you claim a win.

Old skill names

OldUse
cachingThis skill (super-caching)
caching-strategiessuper-caching
caching-strategistsuper-caching

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.