🐛 Fix auth cache

This commit is contained in:
2024-11-03 21:31:32 +08:00
parent 808e7998dd
commit 40b64a3559
6 changed files with 484 additions and 551 deletions

View File

@ -9,16 +9,16 @@ import (
var S store.StoreInterface
func NewStore() error {
ristretto, err := ristretto.NewCache(&ristretto.Config{
NumCounters: 1000,
MaxCost: 100,
ris, err := ristretto.NewCache(&ristretto.Config{
NumCounters: 1e7,
MaxCost: 1 << 27,
BufferItems: 64,
})
if err != nil {
return err
}
S = ristrettoCache.NewRistretto(ristretto)
S = ristrettoCache.NewRistretto(ris)
return nil
}