From c62bcc6d951eb516f011c91a5d360d03f102ed53 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Wed, 31 May 2023 04:24:10 -0700 Subject: [PATCH] Remove drive ID to url cache map from Collections. Unused --- src/internal/m365/onedrive/collections.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 {