diff options
author | aduernberger <aduernberger@googlemail.com> | 2024-04-18 14:34:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 14:34:51 +0200 |
commit | ccc1716bb546423aa9e1eaee19fb470c2ec2fa45 (patch) | |
tree | 20b9b5237321624640c51cae3effd5c316323336 /lualib | |
parent | 20f6d7103e0526de6c8e74d2565e8c399fceacc7 (diff) | |
download | rspamd-ccc1716bb546423aa9e1eaee19fb470c2ec2fa45.tar.gz rspamd-ccc1716bb546423aa9e1eaee19fb470c2ec2fa45.zip |
[Fix] Update is_spam in learned_ids when relearning
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/redis_scripts/bayes_cache_learn.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lualib/redis_scripts/bayes_cache_learn.lua b/lualib/redis_scripts/bayes_cache_learn.lua index 4185e5741..d8a2d878e 100644 --- a/lualib/redis_scripts/bayes_cache_learn.lua +++ b/lualib/redis_scripts/bayes_cache_learn.lua @@ -15,7 +15,8 @@ for i = 0, conf.cache_max_keys do local have = redis.call('HGET', prefix, cache_id) if have then - -- Already in cache + -- Already in cache, but is_spam changes when relearning + redis.call('HSET', prefix, cache_id, is_spam) return false end end @@ -58,4 +59,4 @@ if not added then end end -return true
\ No newline at end of file +return true |