Skip to content

Commit

Permalink
fix bug that KeyWritten params (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
szutoutou authored Jun 7, 2024
1 parent 0fed130 commit cc16762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cache/src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function put($key, $value, $ttl = null): bool
$result = $this->driver->set($key, $value, $seconds);

if ($result) {
$this->event(new KeyWritten($key, $value, $seconds));
$this->event(new KeyWritten($this->getName(), $key, $value, $seconds));
} else {
$this->event(new KeyWriteFailed($this->getName(), $key, $value, $seconds));
}
Expand All @@ -146,7 +146,7 @@ public function putMany(array $values, $ttl = null): bool

foreach ($values as $key => $value) {
if ($result) {
$this->event(new KeyWritten($key, $value, $seconds));
$this->event(new KeyWritten($this->getName(), $key, $value, $seconds));
} else {
$this->event(new KeyWriteFailed($this->getName(), $key, $value, $seconds));
}
Expand Down

0 comments on commit cc16762

Please sign in to comment.