mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
cache usage, prefix-usage, and buckets for AccountInfo up to 10 secs (#18051)
AccountInfo is quite frequently called by the Console UI login attempts, when many users are logging in it is important that we provide them with better responsiveness. - ListBuckets information is cached every second - Bucket usage info is cached for up to 10 seconds - Prefix usage (optional) info is cached for up to 10 secs Failure to update after cache expiration, would still allow login which would end up providing information previously cached. This allows for seamless responsiveness for the Console UI logins, and overall responsiveness on a heavily loaded system.
This commit is contained in:
@@ -611,6 +611,8 @@ func (s *TestSuiteIAM) TestSTSForRoot(c *check) {
|
||||
}
|
||||
userAdmClient.SetCustomTransport(s.TestSuiteCommon.client.Transport)
|
||||
|
||||
time.Sleep(2 * time.Second) // wait for listbuckets cache to be invalidated
|
||||
|
||||
accInfo, err := userAdmClient.AccountInfo(ctx, madmin.AccountOpts{})
|
||||
if err != nil {
|
||||
c.Fatalf("root user STS should be able to get account info: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user