feat: implement auth local cache. (#3533)

* feat: add auth local cache.

* feat: implement auth local cache.

* feat: improve auth localcache.
This commit is contained in:
Monet Lee
2025-08-28 11:26:02 +08:00
committed by GitHub
parent 349a8cd9af
commit 6856a864d0
12 changed files with 230 additions and 24 deletions
+7 -2
View File
@@ -15,10 +15,11 @@
package localcache
import (
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/cachekey"
"strings"
"sync"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/cachekey"
)
var (
@@ -32,6 +33,10 @@ func InitLocalCache(localCache *config.LocalCache) {
Local config.CacheConfig
Keys []string
}{
{
Local: localCache.Auth,
Keys: []string{cachekey.UidPidToken},
},
{
Local: localCache.User,
Keys: []string{cachekey.UserInfoKey, cachekey.UserGlobalRecvMsgOptKey},