Suppress repetitive "missing cache key ping:events:XX" when there are no upcoming events
This commit is contained in:
parent
ae6d67ed1f
commit
979e226d27
1 changed files with 1 additions and 3 deletions
|
@ -161,10 +161,8 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
if (DBA::isResult($ev)) {
|
||||
$all_events = count($ev);
|
||||
|
|
Loading…
Reference in a new issue