From 9e3a9ba4f56377f4f16920760cf66644cbd154d7 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 1 May 2020 15:11:14 +0100 Subject: [PATCH] Make config follow the guidelines --- docs/sample_config.yaml | 27 +++++++++++++++------------ synapse/config/cache.py | 26 ++++++++++++++------------ 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index 7390377f34..941c6e66e9 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -1975,16 +1975,19 @@ opentracing: # false -# Cache configuration -# -# 'global_factor' controls the global cache factor. This overrides the -# "SYNAPSE_CACHE_FACTOR" environment variable. -# -# 'per_cache_factors' is a dictionary of cache name to cache factor for that -# individual cache. -# -#caches: -# global_factor: 0.5 -# per_cache_factors: -# get_users_who_share_room_with_user: 2 +## Cache Configuration ## + +# Caching can be configured through the following options. # +caches: + # Controls the global cache factor. This overrides the "SYNAPSE_CACHE_FACTOR" + # environment variable. + # + # global_factor: 0.5 + + # A dictionary of cache name to cache factor for that + # individual cache. + # + # per_cache_factors: + # get_users_who_share_room_with_user: 2 + diff --git a/synapse/config/cache.py b/synapse/config/cache.py index 2610ae9c25..7a7dbb3d80 100644 --- a/synapse/config/cache.py +++ b/synapse/config/cache.py @@ -70,19 +70,21 @@ class CacheConfig(Config): def generate_config_section(self, **kwargs): return """\ - # Cache configuration - # - # 'global_factor' controls the global cache factor. This overrides the - # "SYNAPSE_CACHE_FACTOR" environment variable. - # - # 'per_cache_factors' is a dictionary of cache name to cache factor for that - # individual cache. - # - #caches: - # global_factor: 0.5 - # per_cache_factors: - # get_users_who_share_room_with_user: 2 + ## Cache Configuration ## + + # Caching can be configured through the following options. # + caches: + # Controls the global cache factor. This overrides the "SYNAPSE_CACHE_FACTOR" + # environment variable. + # + # global_factor: 0.5 + + # A dictionary of cache name to cache factor for that + # individual cache. + # + # per_cache_factors: + # get_users_who_share_room_with_user: 2 """ def read_config(self, config, **kwargs):