Remove dummy url cache

This commit is contained in:
Abhishek Pandey 2023-06-05 18:48:51 -07:00
parent 34e1f393cb
commit 397a0a6aa3
3 changed files with 12 additions and 3 deletions

View File

@ -467,8 +467,8 @@ func (c *Collections) addURLCacheToDriveCollections(
uc, err := newURLCache( uc, err := newURLCache(
driveID, driveID,
urlCacheRefreshInterval, urlCacheRefreshInterval,
errs, c.handler.NewItemPager(driveID, "", api.DriveItemSelectDefault()),
c.handler.ItemPager(driveID, "", api.DriveItemSelectDefault())) errs)
if err != nil { if err != nil {
return err return err
} }

View File

@ -2700,7 +2700,7 @@ func (suite *OneDriveCollectionsUnitSuite) TestURLCacheIntegration() {
suite.Run(test.name, func() { suite.Run(test.name, func() {
t := suite.T() t := suite.T()
ctx, flush := tester.NewContext() ctx, flush := tester.NewContext(t)
defer flush() defer flush()
mbh := mock.DefaultOneDriveBH() mbh := mock.DefaultOneDriveBH()

View File

@ -15,11 +15,20 @@ import (
"github.com/alcionai/corso/src/pkg/services/m365/api" "github.com/alcionai/corso/src/pkg/services/m365/api"
) )
type urlCacher interface {
getItemProperties(
ctx context.Context,
itemID string,
) (itemProps, error)
}
type itemProps struct { type itemProps struct {
downloadURL string downloadURL string
isDeleted bool isDeleted bool
} }
var _ urlCacher = &urlCache{}
// urlCache caches download URLs for drive items // urlCache caches download URLs for drive items
type urlCache struct { type urlCache struct {
driveID string driveID string