Skip to content

Commit

Permalink
Merge pull request #940 from openshift-cherrypick-robot/cherry-pick-9…
Browse files Browse the repository at this point in the history
…12-to-release-4.13

[release-4.13] OCPBUGS-22126: increase storage account key cache expiration
  • Loading branch information
openshift-merge-bot[bot] committed Nov 27, 2023
2 parents ae60ba7 + a566b5a commit e71b854
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/storage/azure/cached_key.go
Expand Up @@ -10,6 +10,9 @@ import (
"github.com/openshift/cluster-image-registry-operator/pkg/metrics"
)

// cacheExpiration is the cache expiration duration in minutes.
const cacheExpiration time.Duration = 20 * time.Minute

// primaryKey keeps account primary key in a cache.
var primaryKey cachedKey

Expand Down Expand Up @@ -44,6 +47,6 @@ func (k *cachedKey) get(
k.resourceGroup = resourceGroup
k.account = account
k.value = *(*keysResponse.Keys)[0].Value
k.expire = time.Now().Add(5 * time.Minute)
k.expire = time.Now().Add(cacheExpiration)
return k.value, nil
}

0 comments on commit e71b854

Please sign in to comment.