Skip to content
Permalink
Browse files

RedisStorage: Remove custom data encoding

  • Loading branch information...
mabar authored and f3l1x committed Jun 10, 2019
1 parent 958ef6c commit 8c5e5fca34bdb16c319360b254f4dd43ddb17f3b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Caching/RedisStorage.php
@@ -29,7 +29,7 @@ public function getClient(): Client
*/
public function write(string $key, $data, array $dependencies): void
{
$this->client->set($key, json_encode($data));
$this->client->set($key, $data);
if (isset($dependencies[Cache::EXPIRATION])) {
$expiration = (int) $dependencies[Cache::EXPIRATION];
@@ -51,7 +51,7 @@ public function read(string $key)
$val = $this->client->get($key);
try {
return json_decode($val);
return $val;
} catch (Throwable $e) {
return null;
}

0 comments on commit 8c5e5fc

Please sign in to comment.
You can’t perform that action at this time.