Skip to content

docs: focus README on safe cache rollouts - #89

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

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

Conversation

@lan17

@lan17 lan17 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the 10,916-word single-page README on current main with a 2,790-word adoption guide that identifies DialCache as a TypeScript read-through caching library before explaining its production and high-scale patterns
  • explain the 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
  • make the ownership boundary explicit: DialCache is an application library, not a frontend cache, cache server, Redis client, or configuration control plane
  • provide a copyable local-only quick start, then reset every shared and shadow ramp to zero before production exposure; add metrics and runtime policy, connect Redis or Valkey without serving it, optionally validate tracked keys in shadow mode, and increase stable cohorts independently
  • keep the README concise while moving complete configuration, Redis/Valkey, shadow validation, invalidation, coalescing/liveness, observability, and release contracts into seven focused reference guides
  • use absolute GitHub file URLs for every README-to-repository link so the packaged 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 current v0.14.1

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 add, 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 introduces request coalescing, runtime policy, deterministic ramp-up and ramp-down, fail-open reads, non-serving Redis shadow validation and bootstrap, targeted invalidation, deadlines, serialization, and backend-neutral observability.

v0.14.1 refresh

This branch includes current main at v0.14.1 and documents the latest released contracts:

  • root-exported ShadowConfig and grouped shadow: { ramp, logMismatches } policy, including independent sparse-leaf overlays, the complete kill switch, strict validation, and rejection of the removed shadowRamp field
  • default-off, confirmed-only shadow mismatch warnings, including metric admission, exact fields, byte caps, native-JSON behavior, observer isolation, and the privacy and synchronous-work limits that truncation does not solve
  • invalidateRemote() as an explicit Redis maintenance operation that rejects when Redis is absent instead of reporting a false success, while preserving bounded metrics, warning, validation order, and original-error propagation
  • updated packed-export, Redis adapter, observability, compatibility, and maintainer guidance for the v0.14.1 surface

Impact

This is documentation-only relative to current main at v0.14.1.

Merging this PR does not republish v0.14.1; 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 — strict typecheck, 407 unit tests with coverage, builds/declarations, and packed ESM/CJS consumers
  • corepack pnpm test:integration — 93 Redis, Valkey, and Redis Cluster tests
  • corepack pnpm benchmark:request-local — all ten semantic scenarios passed
  • fresh GitHub CI passed: package tests, both CodeQL analyses, and PR-title validation
  • two-round independent editorial, technical, coverage, npm-consumer, and source-accuracy review; round one findings were fixed and the fresh confirmation round returned clean
  • syntax-checked all 25 TypeScript documentation blocks
  • validated 73 Markdown links plus three badge image URLs; every local file and anchor resolves
  • README contains 21 absolute repository-file links and zero relative repository-file links
  • longest non-list 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