You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cache): let fully-resolved cached results outlive their TTL (invalidation-driven lifetime) #405
Requested in the #343 review (#343 (review)): "The only case/reason we NEED all the dependencies to be known is when we want to outlast the TTL, which we don't currently support anyway (but should, we need to open a new issue to track this!)".
Today QueryTimeToTTL (cost-based, clamped 10 s–1 h) is a hard ceiling on every cached entry's lifetime; version-keyed invalidation only ever shortens the effective lifetime (a write bumps a namespace version and the entry's key stops matching). After #343, a pipe or structured-query result whose dependency set is fully resolved and version-maintained is already evicted by every relevant write — for those entries the TTL no longer bounds staleness, it only limits how long a hot, un-written result can keep serving from cache.
Proposal
Let a fully-trusted entry outlive its cost-based TTL — a much longer or effectively unbounded TTL, with memory pressure (Ristretto admission/eviction) as the real bound — because correctness is carried by invalidation, not expiry.
Strictly scoped to trusted resolutions. An entry stays on the short leash when it is:
on the database-version fallback (EXPLAIN failed — any write evicts, but the dep set is unknown), or
TTL-capped as unresolved/external/pruned (cache.UnresolvedDepsTTLCap — an unfoldable view, a table function / cross-database read / non-local dictionary, or a dead-branch-pruned set).
Confidence in cascade completeness across schema refreshes (a view redefined in place is evicted at the next refresh; a longer TTL widens the window a missed edge would matter).
Activity
coderabbitai commentedon Jul 10, 2026
🔗 Related PRs
#177 - feat: caching for local table/scope invalidation [closed]
#314 - feat(cache): namespace-versioned cache keys for queries and pipes [closed]
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!