feat : config
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user