Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
fix(Redis): Fix wrong type of Redis call function hMset() to hMSet()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Dec 4, 2019
1 parent 9c21e73 commit a163150
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/Entity/Torrent.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function loadTorrentContentById($id)
$self = app()->pdo->createCommand("SELECT * FROM `torrents` WHERE id=:id LIMIT 1;")->bindParams([
"id" => $id
])->queryOne() ?? [];
app()->redis->hMset(Constant::torrentContent($id), $self);
app()->redis->hMSet(Constant::torrentContent($id), $self);
app()->redis->expire(Constant::torrentContent($id), 1800);
}
$this->importAttributes($self);
Expand Down
2 changes: 1 addition & 1 deletion application/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function __construct($id = null)
if (false === $self) {
app()->redis->zAdd(Constant::invalidUserIdZset, time() + 3600, $id);
} else {
app()->redis->hMset($this->infoCacheKey, $self);
app()->redis->hMSet($this->infoCacheKey, $self);
app()->redis->expire($this->infoCacheKey, 15 * 60); // Cache This User Detail for 15 minutes
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion framework/Http/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function createSessionId()
// 赋值
public function set($name, $value)
{
$success = app()->redis->hmset($this->_sessionKey, [$name => $value]);
$success = app()->redis->hMSet($this->_sessionKey, [$name => $value]);
app()->redis->expire($this->_sessionKey, $this->maxLifetime);
$success and $this->_isNewSession and \Rid::app()->response->setCookie($this->name, $this->_sessionId, $this->cookieExpires, $this->cookiePath, $this->cookieDomain, $this->cookieSecure, $this->cookieHttpOnly);
return $success ? true : false;
Expand Down
2 changes: 1 addition & 1 deletion framework/Redis/BaseRedisConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
* @method bool hExists($key, $hashKey)
* @method int hIncrBy($key, $hashKey, $value)
* @method float hIncrByFloat($key, $field, $increment)
* @method bool hMset($key, $hashKeys)
* @method bool hMSet($key, $hashKeys)
* @method array hMGet($key, $hashKeys)
* @method array config($operation, $key, $value)
* @method mixed evaluate($script, $args = [], $numKeys = 0)
Expand Down

0 comments on commit a163150

Please sign in to comment.