We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae60ba7 + a566b5a commit e71b854Copy full SHA for e71b854
pkg/storage/azure/cached_key.go
@@ -10,6 +10,9 @@ import (
10
"github.com/openshift/cluster-image-registry-operator/pkg/metrics"
11
)
12
13
+// cacheExpiration is the cache expiration duration in minutes.
14
+const cacheExpiration time.Duration = 20 * time.Minute
15
+
16
// primaryKey keeps account primary key in a cache.
17
var primaryKey cachedKey
18
@@ -44,6 +47,6 @@ func (k *cachedKey) get(
44
47
k.resourceGroup = resourceGroup
45
48
k.account = account
46
49
k.value = *(*keysResponse.Keys)[0].Value
- k.expire = time.Now().Add(5 * time.Minute)
50
+ k.expire = time.Now().Add(cacheExpiration)
51
return k.value, nil
52
}
0 commit comments