Parcourir la source

fix: 修复keys匹配失败

runphp il y a 1 mois
Parent
commit
c7054aeac2
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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);
     }