Remove drive ID to url cache map from Collections. Unused
This commit is contained in:
parent
9bd1b5588a
commit
c62bcc6d95
@ -64,9 +64,6 @@ type Collections struct {
|
|||||||
NumItems int
|
NumItems int
|
||||||
NumFiles int
|
NumFiles int
|
||||||
NumContainers int
|
NumContainers int
|
||||||
|
|
||||||
// drive ID -> url cache instance
|
|
||||||
driveURLCache map[string]*urlCache
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewCollections(
|
func NewCollections(
|
||||||
@ -83,7 +80,6 @@ func NewCollections(
|
|||||||
CollectionMap: map[string]map[string]*Collection{},
|
CollectionMap: map[string]map[string]*Collection{},
|
||||||
statusUpdater: statusUpdater,
|
statusUpdater: statusUpdater,
|
||||||
ctrl: ctrlOpts,
|
ctrl: ctrlOpts,
|
||||||
driveURLCache: map[string]*urlCache{},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -386,7 +382,7 @@ func (c *Collections) Get(
|
|||||||
}
|
}
|
||||||
|
|
||||||
numDriveItems := c.NumItems - numPrevItems
|
numDriveItems := c.NumItems - numPrevItems
|
||||||
numPrevItems += numDriveItems
|
numPrevItems = c.NumItems
|
||||||
|
|
||||||
// Only create a drive cache if there are less than 300k items in the drive.
|
// 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.
|
// TODO: Tune this number. Delta query for 300k items takes ~20 mins.
|
||||||
@ -474,8 +470,6 @@ func (c *Collections) addURLCacheToDriveCollections(
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
c.driveURLCache[driveID] = uc
|
|
||||||
|
|
||||||
// Set the URL cache for all collections in this drive
|
// Set the URL cache for all collections in this drive
|
||||||
for _, driveColls := range c.CollectionMap {
|
for _, driveColls := range c.CollectionMap {
|
||||||
for _, coll := range driveColls {
|
for _, coll := range driveColls {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user