diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-01-17 15:11:07 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-01-17 15:11:07 +0000 |
commit | a00c667b4ce0ce8d2f2454787854d191f2d5931b (patch) | |
tree | 8cbccc067ef4656c8b69ccea3b8707c9d6243afc /lualib/lua_bayes_redis.lua | |
parent | da42b91ec31707fac4f9573867401002abbd35c5 (diff) | |
download | rspamd-a00c667b4ce0ce8d2f2454787854d191f2d5931b.tar.gz rspamd-a00c667b4ce0ce8d2f2454787854d191f2d5931b.zip |
[Minor] Remove special handling
Diffstat (limited to 'lualib/lua_bayes_redis.lua')
-rw-r--r-- | lualib/lua_bayes_redis.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lualib/lua_bayes_redis.lua b/lualib/lua_bayes_redis.lua index daa4e6015..753399705 100644 --- a/lualib/lua_bayes_redis.lua +++ b/lualib/lua_bayes_redis.lua @@ -199,7 +199,6 @@ end local function gen_cache_learn_functor(redis_params, learn_script_id, conf) local packed_conf = ucl.to_format(conf, 'msgpack') return function(task, cache_id, is_spam) - local is_per_user = task:get_mempool():has_variable('stat_user') local function learn_redis_cb(err, data) lua_util.debugm(N, task, 'learn_cache redis cb: %s, %s', err, data) end @@ -208,7 +207,7 @@ local function gen_cache_learn_functor(redis_params, learn_script_id, conf) lua_redis.exec_redis_script(learn_script_id, { task = task, is_write = true, key = cache_id }, learn_redis_cb, - { cache_id, is_spam and "1" or "0", packed_conf, is_per_user and "1" or "0" }) + { cache_id, is_spam and "1" or "0", packed_conf }) end end @@ -224,7 +223,6 @@ exports.lua_bayes_init_cache = function(classifier_ucl, statfile_ucl) cache_prefix = "learned_ids", cache_max_elt = 10000, -- Maximum number of elements in the cache key cache_max_keys = 5, -- Maximum number of keys in the cache - cache_per_user_mult = 0.1, -- Multiplier for per user cache size cache_elt_len = 32, -- Length of the element in the cache (will trim id to that value) } |