Remove dummy url cache
This commit is contained in:
parent
34e1f393cb
commit
397a0a6aa3
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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()
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user