fix : update cors and admin user cache

This commit is contained in:
2026-02-24 18:02:18 +08:00
parent 03b57ad514
commit 09d396c77c
16 changed files with 278 additions and 22 deletions

View File

@@ -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);
}
}