mirror of
https://gitee.com/ctexthuang/hyperf-micro-svc.git
synced 2026-03-26 14:40:17 +08:00
fix : update cors and admin user cache
This commit is contained in:
@@ -51,4 +51,16 @@ trait AdminUserTrait
|
||||
|
||||
return $userInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $adminId
|
||||
* @return void
|
||||
*/
|
||||
public function updateAdminUserInfo(int $adminId): void
|
||||
{
|
||||
$key = RedisKey::getAdminUserInfoKey($adminId);
|
||||
if ($this->redis->with()->exists($key)) $this->redis->with()->del($key);
|
||||
if (Context::has($key)) Context::destroy($key);
|
||||
$this->getAdminUserInfo($adminId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user