aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/cfg_file.h3
-rw-r--r--src/libserver/cfg_rcl.c6
-rw-r--r--src/libserver/cfg_utils.c1
3 files changed, 9 insertions, 1 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index a74169b31..12919c198 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -368,7 +368,8 @@ struct rspamd_config {
GList *maps; /**< maps active */
gdouble map_timeout; /**< maps watch timeout */
- gdouble map_file_watch_multiplier; /**< multiplier for watch timeout when maps are files */
+ gdouble map_file_watch_multiplier; /**< multiplier for watch timeout when maps are files */
+ gchar *maps_cache_dir; /**< where to save HTTP cached data */
gdouble monitored_interval; /**< interval between monitored checks */
gboolean disable_monitored; /**< disable monitoring completely */
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index 1b93d5213..3be0a655c 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -1689,6 +1689,12 @@ rspamd_rcl_config_init (struct rspamd_config *cfg, GHashTable *skip_sections)
0,
"Multiplier for map watch interval when map is file");
rspamd_rcl_add_default_handler (sub,
+ "maps_cache_dir",
+ rspamd_rcl_parse_struct_string,
+ G_STRUCT_OFFSET (struct rspamd_config, maps_cache_dir),
+ 0,
+ "Directory to save maps cached data (default: $DBDIR)");
+ rspamd_rcl_add_default_handler (sub,
"monitoring_watch_interval",
rspamd_rcl_parse_struct_time,
G_STRUCT_OFFSET (struct rspamd_config, monitored_interval),
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 967032777..ab01a5403 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -198,6 +198,7 @@ rspamd_config_new (enum rspamd_config_init_flags flags)
#endif
cfg->default_max_shots = DEFAULT_MAX_SHOTS;
cfg->max_sessions_cache = DEFAULT_MAX_SESSIONS;
+ cfg->maps_cache_dir = rspamd_mempool_strdup (cfg->cfg_pool, RSPAMD_DBDIR);
REF_INIT_RETAIN (cfg, rspamd_config_free);