Suppress repetitive "missing cache key ping:events:XX" when there are no upcoming events
This commit is contained in:
parent
ae6d67ed1f
commit
979e226d27
|
@ -161,9 +161,7 @@ class Ping extends BaseModule
|
||||||
$ev = DBA::selectToArray('event', ['type', 'start'],
|
$ev = DBA::selectToArray('event', ['type', 'start'],
|
||||||
["`uid` = ? AND `start` < ? AND `finish` > ? AND NOT `ignore`",
|
["`uid` = ? AND `start` < ? AND `finish` > ? AND NOT `ignore`",
|
||||||
Session::getLocalUser(), DateTimeFormat::utc('now + 7 days'), DateTimeFormat::utcNow()]);
|
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)) {
|
if (DBA::isResult($ev)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user