Honor the API server Dag cache TTL when no size limit is set - #71814
Merged
jason810496 merged 5 commits intoAug 19, 2026
Conversation
This was referenced Aug 19, 2026
jason810496
force-pushed
the
fix/api-dag-cache-ttl-ignored
branch
from
August 19, 2026 07:25
5f87d43 to
a28d57e
Compare
jason810496
marked this pull request as ready for review
August 19, 2026 07:33
jason810496
requested review from
XD-DENG,
ashb,
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
pierrejeambrun,
rawwar and
shubhamraj-git
as code owners
August 19, 2026 07:33
Member
|
We should probably add a news fragment to the behavioral change when |
uranusjr
reviewed
Aug 19, 2026
uranusjr
reviewed
Aug 19, 2026
jason810496
marked this pull request as draft
August 19, 2026 09:03
`[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.
jason810496
force-pushed
the
fix/api-dag-cache-ttl-ignored
branch
from
August 19, 2026 09:47
a28d57e to
5f6c258
Compare
Validating 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
marked this pull request as ready for review
August 19, 2026 12:59
jason810496
commented
Aug 19, 2026
jason810496
left a comment
Member
Author
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[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