diff --git a/app/Cache/Redis/Api/UserCache.php b/app/Cache/Redis/Api/UserCache.php index cd62069..b487a7d 100644 --- a/app/Cache/Redis/Api/UserCache.php +++ b/app/Cache/Redis/Api/UserCache.php @@ -26,7 +26,7 @@ class UserCache public function setUserToken(int $userId,string $token): void { $key = CommonRedisKey::userTokenHashKey(); - $this->redis->hSet($key, $userId, $token); + $this->redis->hSet($key, (string)$userId, $token); } /** @@ -38,7 +38,7 @@ class UserCache public function getUserToken(int $userId): mixed { $key = CommonRedisKey::userTokenHashKey(); - return $this->redis->hGet($key, $userId); + return $this->redis->hGet($key, (string)$userId); } /** @@ -50,6 +50,6 @@ class UserCache public function removeUserToken(int $userId): void { $key = CommonRedisKey::userTokenHashKey(); - $this->redis->hDel($key, $userId); + $this->redis->hDel($key, (string)$userId); } } \ No newline at end of file