Skip to content

Commit

Permalink
SQLlite supports loading ad-hoc saved cache files
Browse files Browse the repository at this point in the history
  • Loading branch information
dotpyu authored Jul 1, 2024
1 parent 00c5fdb commit e8717f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions alfred/client/cache/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e8717f6

Please sign in to comment.