mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +03:00
make LRU cache global for internode tokens (#19555)
This commit is contained in:
+2
-3
@@ -22,7 +22,6 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
jwtgo "github.com/golang-jwt/jwt/v4"
|
||||
xjwt "github.com/minio/minio/internal/jwt"
|
||||
@@ -181,11 +180,11 @@ func BenchmarkAuthenticateNode(b *testing.B) {
|
||||
}
|
||||
})
|
||||
b.Run("cached", func(b *testing.B) {
|
||||
fn := cachedAuthenticateNode(time.Second)
|
||||
fn := newCachedAuthToken()
|
||||
b.ResetTimer()
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
fn(creds.AccessKey, creds.SecretKey, "aud")
|
||||
fn("aud")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user