From 8aab0935e9cb708eb85cf0c4bea0c533df4ad670 Mon Sep 17 00:00:00 2001 From: blissful Date: Tue, 13 Feb 2024 18:09:35 -0500 Subject: [PATCH] bump ttl in vfs TTLCache upon any access --- rose/virtualfs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rose/virtualfs.py b/rose/virtualfs.py index c47bead..09cded8 100644 --- a/rose/virtualfs.py +++ b/rose/virtualfs.py @@ -132,6 +132,7 @@ def __getitem__(self, key: K) -> V: v, insert_time = self.__backing[key] if time.time() - insert_time > self.ttl_seconds: raise KeyError(key) + self.__backing[key] = (v, time.time()) return v def __setitem__(self, key: K, value: V) -> None: