diff --git a/src/Recorders/CacheInteractions.php b/src/Recorders/CacheInteractions.php index 656249ab..a54ceefc 100644 --- a/src/Recorders/CacheInteractions.php +++ b/src/Recorders/CacheInteractions.php @@ -51,10 +51,12 @@ public function record(CacheHit|CacheMissed $event): ?Entry return null; } + $key = $event->key; + return new Entry($this->table, [ 'date' => $now->toDateTimeString(), 'hit' => $event instanceof CacheHit, - 'key' => fn () => $this->normalize($event->key), + 'key' => fn () => $this->normalize($key), 'user_id' => $this->pulse->authenticatedUserIdResolver(), ]); }