Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hishel/_core/_storages/_async_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def __init__(
self.default_ttl = default_ttl
self.refresh_ttl_on_access = refresh_ttl_on_access
self.last_cleanup = time.time() - BATCH_CLEANUP_INTERVAL + BATCH_CLEANUP_START_DELAY
# When this storage instance was created. Used to delay the first cleanup.
self._start_time = time.time()
Copy link
Copy Markdown
Contributor Author

@LiteralGenie LiteralGenie Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't seem to be used anywhere

self._initialized = False
self._lock = Lock()

Expand Down Expand Up @@ -157,6 +155,8 @@ async def get_entries(self, key: str) -> List[Entry]:
except Exception:
# don't let cleanup prevent reads; failures are non-fatal
pass
finally:
self.last_cleanup = time.time()

connection = await self._ensure_connection()
cursor = await connection.cursor()
Expand Down
4 changes: 2 additions & 2 deletions hishel/_core/_storages/_sync_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def __init__(
self.default_ttl = default_ttl
self.refresh_ttl_on_access = refresh_ttl_on_access
self.last_cleanup = time.time() - BATCH_CLEANUP_INTERVAL + BATCH_CLEANUP_START_DELAY
# When this storage instance was created. Used to delay the first cleanup.
self._start_time = time.time()
self._initialized = False
self._lock = RLock()

Expand Down Expand Up @@ -157,6 +155,8 @@ def get_entries(self, key: str) -> List[Entry]:
except Exception:
# don't let cleanup prevent reads; failures are non-fatal
pass
finally:
self.last_cleanup = time.time()

connection = self._ensure_connection()
cursor = connection.cursor()
Expand Down