Skip to content

Commit

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

[release-4.14] OCPBUGS-22127: increase storage account key cache expiration
  • Loading branch information
openshift-merge-bot[bot] committed Nov 7, 2023
2 parents e2d00b2 + 78f556c commit d27b918
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 d27b918

Please sign in to comment.