Skip to content

Commit 8c5e5fc

Browse files
mabarMilan Felix Šulc
authored andcommitted
RedisStorage: Remove custom data encoding
1 parent 958ef6c commit 8c5e5fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Caching/RedisStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function getClient(): Client
2929
*/
3030
public function write(string $key, $data, array $dependencies): void
3131
{
32-
$this->client->set($key, json_encode($data));
32+
$this->client->set($key, $data);
3333

3434
if (isset($dependencies[Cache::EXPIRATION])) {
3535
$expiration = (int) $dependencies[Cache::EXPIRATION];
@@ -51,7 +51,7 @@ public function read(string $key)
5151
$val = $this->client->get($key);
5252

5353
try {
54-
return json_decode($val);
54+
return $val;
5555
} catch (Throwable $e) {
5656
return null;
5757
}

0 commit comments

Comments
 (0)