-
Notifications
You must be signed in to change notification settings - Fork 74
-
Hello! I've noticed sometimes that the files listed with ListFile()are out-of-date. Is there a cache? Can I programmatically empty the cache?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 2 replies
-
hmm, ListFile() should not be cache as far as I remember. How do you run it?
Beta Was this translation helpful? Give feedback.
All reactions
-
def _dict_of_gdrive_files(self, folder_id: str) -> "dict[str, GoogleDriveFile]":
files = self._google_drive.ListFile({"q": f"trashed=false and '{folder_id}' in parents"}).GetList()
return {f["title"]: f for f in files}
Beta Was this translation helpful? Give feedback.
All reactions
-
and how / where do you see those out-of-date files? at what stage? running it the first time, or after?
Beta Was this translation helpful? Give feedback.
All reactions
-
I create a file within a folder then call this a few lines later and there aren't consistently files.
Beta Was this translation helpful? Give feedback.
All reactions
-
so, there is not caching on the PyDrive2 itself. Can be that GDrive needs some time? Hard to tell. Share the full code please. Try to add some sleep in between to at least do some experiements / confirm
Beta Was this translation helpful? Give feedback.