Skip to content

Commit 13cac67

Browse files
committed
Respect return promise from upstream
1 parent aae039a commit 13cac67

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Redis.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,11 @@ public function get($key)
5858
public function set($key, $value)
5959
{
6060
if ($this->ttl === 0) {
61-
$this->client->set($this->prefix . $key, $value);
62-
63-
return;
61+
return $this->client->set($this->prefix . $key, $value);
6462
}
6563

66-
$this->client->set($this->prefix . $key, $value)->then(function () use ($key) {
67-
$this->client->expire($this->prefix . $key, $this->ttl);
64+
return $this->client->set($this->prefix . $key, $value)->then(function () use ($key) {
65+
return $this->client->expire($this->prefix . $key, $this->ttl);
6866
});
6967
}
7068

0 commit comments

Comments
 (0)