Remove drive ID to url cache map from Collections. Unused

This commit is contained in:
Abhishek Pandey 2023-05-31 04:24:10 -07:00
parent 9bd1b5588a
commit c62bcc6d95

View File

@ -64,9 +64,6 @@ type Collections struct {
NumItems int
NumFiles int
NumContainers int
// drive ID -> url cache instance
driveURLCache map[string]*urlCache
}
func NewCollections(
@ -83,7 +80,6 @@ func NewCollections(
CollectionMap: map[string]map[string]*Collection{},
statusUpdater: statusUpdater,
ctrl: ctrlOpts,
driveURLCache: map[string]*urlCache{},
}
}
@ -386,7 +382,7 @@ func (c *Collections) Get(
}
numDriveItems := c.NumItems - numPrevItems
numPrevItems += numDriveItems
numPrevItems = c.NumItems
// Only create a drive cache if there are less than 300k items in the drive.
// TODO: Tune this number. Delta query for 300k items takes ~20 mins.
@ -474,8 +470,6 @@ func (c *Collections) addURLCacheToDriveCollections(
return err
}
c.driveURLCache[driveID] = uc
// Set the URL cache for all collections in this drive
for _, driveColls := range c.CollectionMap {
for _, coll := range driveColls {