From e8717f6220e722b6811af3dc1793d1dd33c2ae32 Mon Sep 17 00:00:00 2001 From: Peilin Yu <54282945+dotpyu@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:34:18 -0400 Subject: [PATCH] SQLlite supports loading ad-hoc saved cache files --- alfred/client/cache/sqlite.py | 1 + 1 file changed, 1 insertion(+) diff --git a/alfred/client/cache/sqlite.py b/alfred/client/cache/sqlite.py index 586e895..fa7c2b0 100644 --- a/alfred/client/cache/sqlite.py +++ b/alfred/client/cache/sqlite.py @@ -237,6 +237,7 @@ def load(self, path: Optional[str] = None): :param path: (optional) The path to load the cache from. If not provided, will load from the path provided at initialization :type path: str """ + if path is not None: self.cache_location = path self.cache_db = sqlite3.connect(":memory:", check_same_thread=False) if os.path.exists(self.cache_location): con = sqlite3.connect(self.cache_location)