From b24425a1fd58908bf47401b6dab4f51ce33e2d34 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 15 Apr 2026 08:04:02 +0530 Subject: [PATCH] ... --- kitty/child.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kitty/child.py b/kitty/child.py index 0f361c799..25ed2a895 100644 --- a/kitty/child.py +++ b/kitty/child.py @@ -116,11 +116,14 @@ class CachedProcessData: def processes_in_group(self, grp: int) -> list[int]: return self.process_group_map()[grp] + def clear_cache(self) -> None: + self.cached_result = None + self.cache_at = 0 + def start_caching(self, refresh: bool = False) -> bool: prev, self.cache_active = self.cache_active, True if refresh or monotonic() - self.cache_at > self.ttl: - self.cached_result = None - self.cache_at = 0 + self.clear_cache() return prev def stop_caching(self, prev: bool) -> None: