瀏覽代碼

fix: 修复keys匹配失败

runphp 1 月之前
父節點
當前提交
c7054aeac2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Hook/AuthHook.php

+ 1 - 1
src/Hook/AuthHook.php

@@ -66,7 +66,7 @@ class AuthHook
      */
     public function getOnlineCount(UserTypeEnum $userType): int
     {
-        $pattern = $this->cache->getCacheKey(self::TOKEN_INFO . $userType->value . ':*:');
+        $pattern = $this->cache->getCacheKey(self::TOKEN_INFO . $userType->value . ':*:*');
         $keys = $this->cache->handler()->keys($pattern);
         return count($keys);
     }