Repository navigation
Add TTL/expiry for task caches and CONCOURSE_DEFAULT_TASK_CACHE_TTL - #9533
Merged
Merged
Conversation
- ttl for task caches defaults to no expiry - ttl must be at least 1s. Shorter intervals are not supported. - added a global config on the web node to allow operators to set a default ttl for task caches Signed-off-by: Taylor Silva <[email protected]>
otherwise the task cache's last_used is not updated. The existing query already takes into account that the cache may exist. Signed-off-by: Taylor Silva <[email protected]>
taylorsilva
force-pushed
the
task-cache-ttl
branch
from
April 15, 2026 17:18
608b6ec to
0447a0d
Compare
Member
Author
|
I've manually tested this to make sure task-level settings are respected and that the web-level default setting applies when no task-level setting is present. |
This was referenced Apr 22, 2026
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.
Changes proposed by this PR
This PR adds a
ttlparam to thetask.cachesobject and a web node flagCONCOURSE_DEFAULT_TASK_CACHE_TTLwhich defaults to a value of0s(no expiry).Task caches currently only expire if a pipeline or job is paused/archived/deleted. For an active pipeline/job with task caches, the caches will grow forever and never be GC'd. This can result in worker disks slowly filling up over several days or weeks unless the cache user takes deliberate steps to manage their task cache.
When upgrading to a version with this feature all existing task caches will receive a TTL of 0 (no expiry). If a default TTL is set, as task caches are used, their TTL will be updated to the default or the one configured in the task. The task-level configuration takes precedence over the web-node level setting.
Example pipeline: