end
local function check_av_cache(task, rule, fn)
+ local key = task:get_digest()
+
local function redis_av_cb(err, data)
if data and type(data) == 'string' then
-- Cached
if data ~= 'OK' then
+ rspamd_logger.debugm(N, task, 'got cached result for %s: %s', key, data)
yield_result(task, rule, data)
+ else
+ rspamd_logger.debugm(N, task, 'got cached result for %s: %s', key, data)
end
else
if err then
end
if redis_params then
- local key = task:get_digest()
+
if redis_params['prefix'] then
key = redis_params['prefix'] .. key
end
if err then
rspamd_logger.errx(task, 'failed to save virus cache for %s -> "%s": %s',
to_save, key, err)
+ else
+ rspamd_logger.debugm(N, task, 'saved cached result for %s: %s', key, to_save)
end
end