update s3 session cache key (#6923)

This commit is contained in:
chalet 2025-06-26 18:21:35 +08:00 committed by GitHub
parent ab49540d2b
commit 877b9b788a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,8 @@ func createSession(awsAccessKeyId, awsSecretAccessKey, region, endpoint string,
sessionsLock.Lock()
defer sessionsLock.Unlock()
if t, found := s3Sessions[region]; found {
cacheKey := fmt.Sprintf("%s|%s", region, endpoint)
if t, found := s3Sessions[cacheKey]; found {
return t, nil
}