Skip to content

docs: focus README on safe cache rollouts - #89

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

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

Conversation

@lan17

@lan17 lan17 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the 10,397-word single-page README on current main with a 2,535-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 followed by a safe production path: add metrics, define a remote TTL with serving and shadow ramps at zero, connect Redis or Valkey, optionally validate tracked keys in shadow mode, then increase a stable serving cohort
  • keep the README concise while moving complete configuration, Redis/Valkey, shadow validation, invalidation, coalescing/liveness, observability, and release contracts into 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.13.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 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.13.0 refresh

This branch now includes current main and documents the contracts added in v0.12.0 and v0.13.0:

  • one-year cache-TTL and invalidation-buffer ceilings, plus strict runtime ramp validation with no clamping
  • shadowRamp, shadowMaxInFlight, shadowComparator, independent serving/shadow cohorts, and complete kill-switch semantics
  • tracked Redis serving-hit validation and ramped-down clean-miss filling, including the C0 / source / C1 confirmation model
  • capacity, deduplication, deadlines, detachment, shutdown, serializer, payload-ownership, invalidation-race, and command-amplification contracts
  • Prometheus and Datadog shadow metrics, remote_shadow, all bounded outcomes, and observer rejection isolation
  • updated coalescing, Redis lifecycle, invalidation-window, compatibility, and ten-scenario benchmark guidance

Impact

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

Merging this PR does not republish v0.13.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 — strict typecheck, 384 unit tests with coverage, builds/declarations, and packed 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: test, CodeQL, and PR-title validation
  • independent iterative editorial and technical reviews across the README, maintainer map, core reference guides, and Redis/shadow guide; the final round returned no findings
  • syntax-checked all 24 TypeScript documentation blocks
  • validated 70 Markdown links; every local file and anchor resolves
  • README contains 21 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