Skip to content

fix(cli): cache.defaultTtlMs sets the lease on the rungs the boot builds - #1276

Merged
sebyx07 merged 1 commit into
mainfrom
fix/cache-default-ttl
Nov 19, 2026
Merged

sebyx07 merged 1 commit into
mainfrom
fix/cache-default-ttl

Conversation

@sebyx07

@sebyx07 sebyx07 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Closes #1260.

cache.defaultTtlMs was validated at boot and documented, but nothing read it. This takes option 1 from the issue, because it breaks nothing.

  • startCacheTiers takes defaultTtlMs. runtime-services.ts passes config.cache.defaultTtlMs, and buildTier hands it to lruTier and redisTier.
  • A rung supplied through runtime.ts's cacheTiers keeps its own default, because the replacement is the whole rung.
  • Behaviour change: a boot-built Redis rung used to hold values set with no ttlMs for 300 s. It now uses the configured value, 60 s by default, which is what the docs say. CHANGELOG notes it.

Tests: two cases in runtime-cache-limits.test.ts. One checks that the configured lease is used; it fails without the fix, because it sees the tier's 60 s default. The other checks that a supplied rung keeps its own lease. bun run typecheck and biome are green. Local preflight was green except coverage cli, which hit its 600 s local time limit with no verdict.

🤖 Generated with Claude Code

Closes #1260. The key was validated and documented and read by nothing:
buildTier now passes it to lruTier and redisTier. A rung supplied through
runtime.ts's cacheTiers keeps its own default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@developerz-ai

developerz-ai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Reviewed — nothing blocking

0 actionable comment(s) · grounded on your code

@developerz-ai developerz-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary — 5 file(s), 0 finding(s).

Wires cache.defaultTtlMs into boot-built LRU and Redis tiers while preserving supplied tiers’ defaults, with regression tests and documentation. The Redis default lease changes from 300 seconds to the configured value; no concrete defects found in the provided diff.

@sebyx07
sebyx07 merged commit bcbc201 into main Nov 19, 2026
43 checks passed
@sebyx07
sebyx07 deleted the fix/cache-default-ttl branch November 19, 2026 10:11
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.

core: cache.defaultTtlMs is validated and documented but nothing reads it

1 participant