diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-08 22:04:36 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-08 22:04:36 +0100 |
commit | c1c8dba96ef13bfc8725a5142d751601c48c6719 (patch) | |
tree | 03b0921667029da36e23194074b84029e80c56df /src/plugins/dkim_check.c | |
parent | 6538f7ff7c62de807adca85e5db49d7cccab67d4 (diff) | |
download | rspamd-c1c8dba96ef13bfc8725a5142d751601c48c6719.tar.gz rspamd-c1c8dba96ef13bfc8725a5142d751601c48c6719.zip |
[Feature] Use heap in LRU caches
Signed-off-by: Vsevolod Stakhov <vsevolod@highsecure.ru>
Diffstat (limited to 'src/plugins/dkim_check.c')
-rw-r--r-- | src/plugins/dkim_check.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 7852ddd6c..ee62eb50e 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -222,7 +222,7 @@ dkim_module_config (struct rspamd_config *cfg) const ucl_object_t *value; const gchar *str; gint res = TRUE, cb_id; - guint cache_size, cache_expire; + guint cache_size; gboolean got_trusted = FALSE; if (!rspamd_config_is_module_enabled (cfg, "dkim")) { @@ -261,14 +261,7 @@ dkim_module_config (struct rspamd_config *cfg) else { cache_size = DEFAULT_CACHE_SIZE; } - if ((value = - rspamd_config_get_module_opt (cfg, "dkim", - "dkim_cache_expire")) != NULL) { - cache_expire = ucl_obj_todouble (value); - } - else { - cache_expire = DEFAULT_CACHE_MAXAGE; - } + if ((value = rspamd_config_get_module_opt (cfg, "dkim", "time_jitter")) != NULL) { dkim_module_ctx->time_jitter = ucl_obj_todouble (value); @@ -364,7 +357,6 @@ dkim_module_config (struct rspamd_config *cfg) dkim_module_ctx->dkim_hash = rspamd_lru_hash_new ( cache_size, - cache_expire, g_free, /* Keys are just C-strings */ dkim_module_key_dtor); |