Skip to content

perf: shorten update-check TTL from 24h to 6h - #172

Merged
robotrocketscience merged 1 commit into
mainfrom
feat/update-check-ttl-6h
Apr 28, 2026
Merged

robotrocketscience merged 1 commit into
mainfrom
feat/update-check-ttl-6h

Conversation

@robotrocketscience

Copy link
Copy Markdown
Owner

Summary

  • CACHE_TTL_SECONDS in src/aelfrice/lifecycle.py drops from 24 * 60 * 60 to 6 * 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.
  • Updated stale # 24h TTL comment in src/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) and maybe_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).
  • Staging-gate (gitleaks + PII + pytest matrix) on PR.

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
robotrocketscience force-pushed the feat/update-check-ttl-6h branch from 25f6db6 to 0f48cda Compare April 28, 2026 15:35
@robotrocketscience
robotrocketscience merged commit fb8a7df into main Apr 28, 2026
8 checks passed
@robotrocketscience
robotrocketscience deleted the feat/update-check-ttl-6h branch April 28, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant