Re-sync every so often, in case caches appear
parent
a14831d209
commit
50fcb4a8c5
|
@ -242,6 +242,7 @@ class HomeServer(object):
|
|||
self.datastores = DataStores(datastore, conn, self)
|
||||
conn.commit()
|
||||
self.start_time = int(self.get_clock().time())
|
||||
self.get_clock().looping_call(self.config.caches.resize_caches, 10000)
|
||||
logger.info("Finished setting up.")
|
||||
|
||||
def setup_master(self):
|
||||
|
@ -252,7 +253,6 @@ class HomeServer(object):
|
|||
"""
|
||||
for i in self.REQUIRED_ON_MASTER_STARTUP:
|
||||
getattr(self, "get_" + i)()
|
||||
self.config.caches.resize_caches()
|
||||
|
||||
def get_reactor(self):
|
||||
"""
|
||||
|
|
|
@ -246,14 +246,10 @@ class StateGroupWorkerStore(
|
|||
# We size the non-members cache to be smaller than the members cache as the
|
||||
# vast majority of state in Matrix (today) is member events.
|
||||
|
||||
self._state_group_cache = DictionaryCache(
|
||||
"*stateGroupCache*",
|
||||
# TODO: this hasn't been tuned yet
|
||||
50000 * hs.config.caches.get_factor_for("stateGroupCache"),
|
||||
)
|
||||
# TODO: this hasn't been tuned yet
|
||||
self._state_group_cache = DictionaryCache("*stateGroupCache*", 50000)
|
||||
self._state_group_members_cache = DictionaryCache(
|
||||
"*stateGroupMembersCache*",
|
||||
500000 * hs.config.caches.get_factor_for("stateGroupMembersCache"),
|
||||
"*stateGroupMembersCache*", 500000
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Reference in New Issue