Add url cache select params

This commit is contained in:
Abhishek Pandey 2023-08-21 11:12:28 +05:30
parent c6a568501e
commit 0ec493e7d8
2 changed files with 12 additions and 1 deletions

View File

@ -471,7 +471,7 @@ func (c *Collections) addURLCacheToDriveCollections(
driveID,
prevDelta,
urlCacheRefreshInterval,
c.handler.NewItemPager(driveID, "", api.DriveItemSelectDefault()),
c.handler.NewItemPager(driveID, "", api.DriveItemSelectURLCache()),
errs)
if err != nil {
return err

View File

@ -112,3 +112,14 @@ func DriveItemSelectDefault() []string {
"malware",
"shared")
}
// URL cache only needs a subset of default select fields.
// This improves memory usage for delta query operations done by URL cache.
func DriveItemSelectURLCache() []string {
return idAnd(
"content.downloadUrl",
"deleted",
"file",
"folder",
)
}