]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Update is_spam in learned_ids when relearning
authoraduernberger <aduernberger@googlemail.com>
Thu, 18 Apr 2024 12:34:51 +0000 (14:34 +0200)
committerGitHub <noreply@github.com>
Thu, 18 Apr 2024 12:34:51 +0000 (14:34 +0200)
lualib/redis_scripts/bayes_cache_learn.lua

index 4185e574169fd0e91618373f1096bff2cbd464a8..d8a2d878eb7bd2a47dfe8220048bccaa9d8ea380 100644 (file)
@@ -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