Skip to content

Commit

Permalink
Update Service/Cache/Psr16CacheAdapter.php
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Danaita <me@dsa.io>
  • Loading branch information
artyom-jaksov-tl and stefandanaita authored Oct 17, 2024
1 parent 03c19af commit 0b2889b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Service/Cache/Psr16CacheAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ public function get(string $key, mixed $default = null): mixed
{
$item = $this->cacheFrontend->load($key);

if ($item !== false) {
$item = unserialize($item);
} else {
$item = $default;
if ($item === false) {
return $default;
}

return $item;
return unserialize($item);
}

/**
Expand Down

0 comments on commit 0b2889b

Please sign in to comment.