]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Change expiration logic for redis_cache
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 9 Mar 2024 12:19:18 +0000 (12:19 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 9 Mar 2024 12:21:29 +0000 (12:21 +0000)
Noticed by: @jeremy

lualib/redis_scripts/bayes_cache_learn.lua

index 8811f3c3358042e5e117adcdecc95f1bebb42afe..4185e574169fd0e91618373f1096bff2cbd464a8 100644 (file)
@@ -43,7 +43,7 @@ if not added then
     local exists = redis.call('EXISTS', prefix)
 
     if exists then
-      if expired then
+      if not expired then
         redis.call('DEL', prefix)
         redis.call('HSET', prefix, cache_id, is_spam)