perf: shorten update-check TTL from 24h to 6h - #172
Merged
Merged
Conversation
Rapid-dev cadence: PyPI version cache refreshes 4x/day instead of 1x/day so the upgrade-nudge banner reflects new releases sooner. CACHE_TTL_SECONDS in lifecycle.py drives both the statusline freshness gate and maybe_check_for_update_async()'s spawn decision. Updated stale comment in cli.py _cmd_upgrade for the same constant.
robotrocketscience
force-pushed
the
feat/update-check-ttl-6h
branch
from
April 28, 2026 15:35
25f6db6 to
0f48cda
Compare
Merged
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.
Summary
CACHE_TTL_SECONDSinsrc/aelfrice/lifecycle.pydrops from24 * 60 * 60to6 * 60 * 60. PyPI version cache now refreshes up to 4x/day instead of 1x/day so the upgrade-nudge banner surfaces new releases sooner during rapid-dev.# 24h TTLcomment insrc/aelfrice/cli.py:_cmd_upgrade(the constant is the source of truth; comment now just says "cache TTL").The constant drives both
cache_is_fresh()(statusline read path) andmaybe_check_for_update_async()(background spawn gate). No API change, no new surface, no schema change.Test plan
uv run pytest tests/test_lifecycle.py tests/test_statusline.py tests/test_setup_statusline.py— 67 pass, 2 skip (pre-existing skips).