From 979e226d27c973c2a6f4080605253408840f7ef0 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 19 Oct 2022 09:17:28 -0400 Subject: [PATCH] Suppress repetitive "missing cache key ping:events:XX" when there are no upcoming events --- src/Module/Notifications/Ping.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Module/Notifications/Ping.php b/src/Module/Notifications/Ping.php index e8dd0ce2d8..0a2d02390f 100644 --- a/src/Module/Notifications/Ping.php +++ b/src/Module/Notifications/Ping.php @@ -161,9 +161,7 @@ class Ping extends BaseModule $ev = DBA::selectToArray('event', ['type', 'start'], ["`uid` = ? AND `start` < ? AND `finish` > ? AND NOT `ignore`", Session::getLocalUser(), DateTimeFormat::utc('now + 7 days'), DateTimeFormat::utcNow()]); - if (DBA::isResult($ev)) { - DI::cache()->set($cachekey, $ev, Duration::HOUR); - } + DI::cache()->set($cachekey, $ev, Duration::HOUR); } if (DBA::isResult($ev)) { -- 2.39.5