Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Move and tweak comment about Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Jul 21, 2023
1 parent 8ece6c0 commit 71fcc0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions synapse/storage/databases/main/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,13 @@ def __init__(
else:
self._cache_id_gen = None

# Occasionally clean up the cache invalidations stream table by deleting
# old rows.
# This is only applicable when Postgres is in use; this table is unused
# and not populated at all when SQLite is the active database engine.
if hs.config.worker.run_background_tasks and isinstance(
self.database_engine, PostgresEngine
):
# Occasionally clean up the cache invalidations stream table.
# This is only applicable if we are on Postgres and therefore populate
# those tables.
self.hs.get_clock().call_later(
CATCH_UP_CLEANUP_INTERVAL_MS / 1000,
self._clean_up_cache_invalidation_wrapper,
Expand Down

0 comments on commit 71fcc0e

Please sign in to comment.