From ef35949188cf28e063eca4853b7152a06a585ec2 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 9 Mar 2024 12:19:18 +0000 Subject: [Fix] Change expiration logic for redis_cache Noticed by: @jeremy --- lualib/redis_scripts/bayes_cache_learn.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lualib') 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) -- cgit v1.2.3