fix(sidebar): preserve expired cache entries for stale follower fallback

This commit is contained in:
Rod Boev committed 2026-06-13 22:36:25 -04:00
1 parent 43972652e7
commit 9f86bfee40
1 file changed
+2 -3
+2 -3
View File
@@ -1635,7 +1635,7 @@ def _get_cached_session_list_payload(
pass
return cached
stale = cached
stale = cached # now actually a stale payload when one exists, else None
event, is_owner = _session_list_cache_claim_rebuild(key)
if is_owner:
if diag is not None:
@@ -1682,7 +1682,7 @@ def _get_cached_session_list_payload(
timeout = _SESSIONS_CACHE_WAIT_SECONDS
event.wait(timeout)
latest, _ = _session_list_cache_get(key)
latest, is_fresh = _session_list_cache_get(key, allow_stale=False)
if latest is not None:
if diag is not None:
try:
@@ -7002,7 +7002,6 @@ def handle_get(handler, parsed) -> bool:
settings.get("show_previous_messaging_sessions")
)
show_cron_sessions = bool(settings.get("show_cron_sessions"))
diag.stage("active_profile")
active_profile = get_active_profile_name()
all_profiles = _all_profiles_query_flag(parsed)
key = _session_list_cache_key(