Skip to content

Commit 1b64eb9

Browse files
authored
Fix Cache config not existing in the handling of cache events (#3928)
1 parent d097fc4 commit 1b64eb9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/Listeners/CacheListener.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ public function handle(CacheHit|CacheMissed|KeyForgotten|KeyWritten $event): voi
3131
return;
3232
}
3333

34-
if ($config_manager->getValueAsBool('cache_event_logging') === false) {
34+
try {
35+
if ($config_manager->getValueAsBool('cache_event_logging') === false) {
36+
return;
37+
}
38+
} catch (\Exception) {
39+
// In case of any error (e.g., during initial setup), we do not log cache events.
3540
return;
3641
}
3742

0 commit comments

Comments
 (0)