aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/redis_scripts
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-03-09 12:19:18 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-03-09 12:21:29 +0000
commitef35949188cf28e063eca4853b7152a06a585ec2 (patch)
treeb2a2567a2ebd884685eee56dc5138917403d2677 /lualib/redis_scripts
parent9dcce12100173c376f1b9ae3c435913e8e275451 (diff)
downloadrspamd-ef35949188cf28e063eca4853b7152a06a585ec2.tar.gz
rspamd-ef35949188cf28e063eca4853b7152a06a585ec2.zip
[Fix] Change expiration logic for redis_cache
Noticed by: @jeremy
Diffstat (limited to 'lualib/redis_scripts')
-rw-r--r--lualib/redis_scripts/bayes_cache_learn.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/redis_scripts/bayes_cache_learn.lua b/lualib/redis_scripts/bayes_cache_learn.lua
index 8811f3c33..4185e5741 100644
--- a/lualib/redis_scripts/bayes_cache_learn.lua
+++ b/lualib/redis_scripts/bayes_cache_learn.lua
@@ -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)