diff options
Diffstat (limited to 'synapse/config/database.py')
-rw-r--r-- | synapse/config/database.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/config/database.py b/synapse/config/database.py index 0d33583a7d..87efe54645 100644 --- a/synapse/config/database.py +++ b/synapse/config/database.py @@ -20,7 +20,11 @@ import os class DatabaseConfig(Config): def __init__(self, args): super(DatabaseConfig, self).__init__(args) - self.database_path = self.abspath(args.database_path) + if args.database_path == ":memory:": + 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): @@ -30,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): |