Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Caching #345

Unanswered
Enkidu93 asked this question in Q&A
May 6, 2024 · 3 comments · 2 replies
Discussion options

@shcheklein

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?

You must be logged in to vote

Replies: 3 comments 2 replies

Comment options

hmm, ListFile() should not be cache as far as I remember. How do you run it?

You must be logged in to vote
0 replies
Comment options

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}
You must be logged in to vote
1 reply
Comment options

and how / where do you see those out-of-date files? at what stage? running it the first time, or after?

Comment options

I create a file within a folder then call this a few lines later and there aren't consistently files.

You must be logged in to vote
1 reply
Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /