Uh oh!
There was an error while loading. Please reload this page.
Honor the API server Dag cache TTL when no size limit is set - #71814
Conversation
5f87d43 to
a28d57eCompareuranusjr
commented
Aug 19, 2026
We should probably add a news fragment to the behavioral change when |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
`[api] dag_cache_size = 0` reads as "no size limit", but it selected a mapping that never evicted at all and silently ignored `[api] dag_cache_ttl`. Age-based eviction could therefore only be enabled by also accepting a size cap, which is backwards for a deployment that wants to bound staleness rather than count. A TTL now applies with or without a size limit, and only setting both options to 0 disables eviction. Deployments on `dag_cache_size = 0` start evicting on the default hour-long TTL; setting `dag_cache_ttl = 0` restores the old behaviour. The options were also documented as added in 3.3.0. They shipped in 3.2.2.
Negative cache configuration should fail fast, and operator guidance must reflect that TTL refreshes happen only at revalidation boundaries.
a28d57e to
5f6c258CompareValidating at the shared boundary prevents non-API callers from silently clamping invalid cache settings.
Context-specific errors help operators identify invalid API settings, while defensive constructor checks protect other callers and documentation remains compatible with the spellchecker.
jason810496
left a comment
There was a problem hiding this comment.
We should probably add a news fragment to the behavioral change when
dag_cache_size = 0since it’s visible to the user. The change is justified as a bug fix, but the fix may in turn cause issues in existing deployments.
Thanks TP for the review. I’ve resolved all the comments, and it makes sense to add the new fragment.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…set (#71814) (#71845) * Honor the API server Dag cache TTL when no size limit is set `[api] dag_cache_size = 0` reads as "no size limit", but it selected a mapping that never evicted at all and silently ignored `[api] dag_cache_ttl`. Age-based eviction could therefore only be enabled by also accepting a size cap, which is backwards for a deployment that wants to bound staleness rather than count. A TTL now applies with or without a size limit, and only setting both options to 0 disables eviction. Deployments on `dag_cache_size = 0` start evicting on the default hour-long TTL; setting `dag_cache_ttl = 0` restores the old behaviour. The options were also documented as added in 3.3.0. They shipped in 3.2.2. * Reject negative API Dag cache values and clarify TTL behavior Negative cache configuration should fail fast, and operator guidance must reflect that TTL refreshes happen only at revalidation boundaries. * Reject negative cache values for every DBDagBag caller Validating at the shared boundary prevents non-API callers from silently clamping invalid cache settings. * Clarify cache validation context and docs wording Context-specific errors help operators identify invalid API settings, while defensive constructor checks protect other callers and documentation remains compatible with the spellchecker. * Clarify API cache TTL documentation layout (cherry picked from commit f63d321)
[api] dag_cache_size = 0reads as "no size limit", but it selected a mapping that never evicted and silently ignored[api] dag_cache_ttl. Age-based eviction could only be enabled by also accepting a size cap.A TTL now applies with or without a size limit; only setting both options to
0disables eviction. Deployments ondag_cache_size = 0start evicting on the default hour-long TTL — setdag_cache_ttl = 0to keep the old behaviour.Also corrects the documented
version_addedfor both options: 3.2.2, not 3.3.0.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines