Skip to content

Commit

Permalink
fix(fs): remove DVC-specific broken cache optimization (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein authored Dec 18, 2023
1 parent a3c9e45 commit af35d4b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pydrive2/fs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,6 @@ def _ids_cache(self):
}

self._cache_path_id(self.base, cache["root_id"], cache=cache)

for item in self._gdrive_list(
"'{}' in parents and trashed=false".format(cache["root_id"])
):
item_path = posixpath.join(self.base, item["title"])
self._cache_path_id(item_path, item["id"], cache=cache)

return cache

def _cache_path_id(self, path, *item_ids, cache=None):
Expand Down Expand Up @@ -392,9 +385,7 @@ def _create_dir(self, parent_id, title, remote_path):
return cached[0]

item = self._gdrive_create_dir(parent_id, title)

if parent_id == self._ids_cache["root_id"]:
self._cache_path_id(remote_path, item["id"])
self._cache_path_id(remote_path, item["id"])

return item["id"]

Expand Down

0 comments on commit af35d4b

Please sign in to comment.