Skip to content

docs: focus README on safe cache rollouts#89

Draft
lan17 wants to merge 6 commits into
mainfrom
docs/readme-safety-adoption
Draft

docs: focus README on safe cache rollouts#89
lan17 wants to merge 6 commits into
mainfrom
docs/readme-safety-adoption

Conversation

@lan17

@lan17 lan17 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the 7,680-word single-page README with a 2,161-word backend adoption guide that first identifies DialCache as a TypeScript read-through caching library, then explains the production and high-scale patterns it adds around that core path
  • explain the concrete execution model up front: wrap reusable readers with cached() or use getOrLoad() inline; after active layers miss, DialCache calls the application loader and publishes to active request-local, bounded process-local, and optional Redis or Valkey layers
  • provide a copyable local-only quick start, then a safe production path that adds metrics, a remote TTL with a zero ramp, Redis or Valkey, and deterministic cohort expansion in that order
  • make missing runtime policy fail safe in the rollout example by keeping both baseline ramps at zero
  • clarify long-lived instance ownership, explicit enable/disable scopes, fail-open cache behavior, ramp-down semantics, value identity, invalidation boundaries, deadlines, and application-owned resource budgets
  • move complete configuration, Redis/Valkey, serialization, invalidation, coalescing/liveness, observability, and release contracts into focused reference guides
  • document the full custom Redis and metrics adapter contracts, advanced wire protocol, provider key input, lower-level context API, and compatibility-sensitive maintainer checks
  • use absolute GitHub file URLs for every README-to-repository link so the README renders predictably on npm even though docs/ is not included in the package tarball
  • preserve the Node.js 22.0.0 minimum and supported-LTS recommendation from v0.11.0

Why

The README on current main is technically thorough but makes experienced backend engineers work too hard to establish the basic mental model: What kind of cache is this? What happens on a miss? Which layers does it manage? Which production patterns does it provide, and which infrastructure and safety decisions remain application-owned?

The revised README answers those questions before setup. It frames DialCache as read-through caching first, then identifies the production patterns around it: request coalescing, runtime policy, deterministic ramp-up and ramp-down, fail-open reads, targeted invalidation, serialization, deadlines, and backend-neutral metrics. The quick start demonstrates a visible process-local hit, and the production path makes monitored remote rollout explicit.

Impact

This is documentation-only. The branch is based on current main at v0.11.0, including the Node.js >=22.0.0 runtime floor and dependency-advisory remediation.

Merging this PR does not republish v0.11.0; the rewritten README will appear on npm with a future package release. Its absolute links will resolve to the merged reference guides on main.

Validation

  • corepack pnpm check under Node 22.22.0 — typecheck, 278 unit tests, coverage, builds/declarations, and packed consumers
  • corepack pnpm test:integration — 73 Redis, Valkey, and Redis Cluster tests
  • corepack pnpm benchmark:request-local — all six semantic scenarios passed, including one-read/one-timer deadline coalescing
  • latest GitHub CI passed, including development/integration checks, the exact Node 22.0.0 packed-package floor, CodeQL, and PR-title validation
  • three iterative editorial rounds across writing/engagement, onboarding safety, and reference accuracy; the final full round returned no findings
  • final experienced-engineer explanation pass checks the opening in this order: category, execution model, cache layers, production patterns, rollout meaning, and ownership boundary
  • syntax-checked all 23 TypeScript documentation blocks
  • validated 49 Markdown links; all local files and anchors resolve
  • README contains 18 absolute repository-file links and zero relative repository-file links
  • longest prose paragraph across the README and guides is 54 words
  • git diff --check

@lan17
lan17 force-pushed the docs/readme-safety-adoption branch 2 times, most recently from 3d14c88 to 09d3ee5 Compare July 26, 2026 00:27
@lan17
lan17 force-pushed the docs/readme-safety-adoption branch from 09d3ee5 to 4a2dc71 Compare July 26, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant