mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Add a cache for get_event
This commit is contained in:
parent
d8324d5a2b
commit
f5a70e0d2e
6 changed files with 43 additions and 5 deletions
|
@ -24,6 +24,7 @@ class DatabaseConfig(Config):
|
|||
self.database_path = ":memory:"
|
||||
else:
|
||||
self.database_path = self.abspath(args.database_path)
|
||||
self.event_cache_size = self.parse_size(args.event_cache_size)
|
||||
|
||||
@classmethod
|
||||
def add_arguments(cls, parser):
|
||||
|
@ -33,6 +34,10 @@ class DatabaseConfig(Config):
|
|||
"-d", "--database-path", default="homeserver.db",
|
||||
help="The database name."
|
||||
)
|
||||
db_group.add_argument(
|
||||
"--event-cache-size", default="100K",
|
||||
help="Number of events to cache in memory."
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def generate_config(cls, args, config_dir_path):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue