From: Vsevolod Stakhov Date: Sat, 9 Mar 2024 12:19:18 +0000 (+0000) Subject: [Fix] Change expiration logic for redis_cache X-Git-Tag: 3.9.0~103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef35949188cf28e063eca4853b7152a06a585ec2;p=thirdparty%2Frspamd.git [Fix] Change expiration logic for redis_cache Noticed by: @jeremy --- diff --git a/lualib/redis_scripts/bayes_cache_learn.lua b/lualib/redis_scripts/bayes_cache_learn.lua index 8811f3c335..4185e57416 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)