Skip to content

Commit

Permalink
Improve memory handling
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Oct 9, 2023
1 parent bb56dd6 commit 6db352d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Recorders/CacheInteractions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
]);
}
Expand Down

0 comments on commit 6db352d

Please sign in to comment.