diff --git a/src/internal/m365/onedrive/collections.go b/src/internal/m365/onedrive/collections.go index cfc0e2ccf..fb6c156e6 100644 --- a/src/internal/m365/onedrive/collections.go +++ b/src/internal/m365/onedrive/collections.go @@ -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 {