Add clear cache indicators to output
- Show "⚡ CACHED RESULTS (Xh old)" in compact output header - Add "use --refresh for fresh data" hint - Track from_cache and cache_age_hours in Report schema - Update UI to show cache age in stderr message Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -236,11 +236,13 @@ def main():
|
||||
progress = ui.ProgressDisplay(args.topic, show_banner=True)
|
||||
|
||||
if not args.refresh and not args.mock:
|
||||
cached = cache.load_cache(cache_key)
|
||||
cached, cache_age = cache.load_cache_with_age(cache_key)
|
||||
if cached:
|
||||
# Use cached data
|
||||
progress.show_cached()
|
||||
progress.show_cached(cache_age)
|
||||
report = schema.Report.from_dict(cached)
|
||||
report.from_cache = True
|
||||
report.cache_age_hours = cache_age
|
||||
output_result(report, args.emit)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user