Skip to content

Commit 56bae2f

Browse files
committed
chore: TimedCache code change due to azure lib upgrade
1 parent 4924b6c commit 56bae2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/blob/blob.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ type Driver struct {
202202
// a map storing all volumes created by this driver <volumeName, accountName>
203203
volMap sync.Map
204204
// a timed cache storing all volumeIDs and storage accounts that are using data plane API
205-
dataPlaneAPIVolCache *azcache.TimedCache
205+
dataPlaneAPIVolCache azcache.Resource
206206
// a timed cache storing account search history (solve account list throttling issue)
207-
accountSearchCache *azcache.TimedCache
207+
accountSearchCache azcache.Resource
208208
}
209209

210210
// NewDriver Creates a NewCSIDriver object. Assumes vendor version is equal to driver version &
@@ -236,10 +236,10 @@ func NewDriver(options *DriverOptions) *Driver {
236236

237237
var err error
238238
getter := func(key string) (interface{}, error) { return nil, nil }
239-
if d.accountSearchCache, err = azcache.NewTimedcache(time.Minute, getter); err != nil {
239+
if d.accountSearchCache, err = azcache.NewTimedCache(time.Minute, getter, false); err != nil {
240240
klog.Fatalf("%v", err)
241241
}
242-
if d.dataPlaneAPIVolCache, err = azcache.NewTimedcache(10*time.Minute, getter); err != nil {
242+
if d.dataPlaneAPIVolCache, err = azcache.NewTimedCache(10*time.Minute, getter, false); err != nil {
243243
klog.Fatalf("%v", err)
244244
}
245245
return &d

0 commit comments

Comments
 (0)