-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
When I use DownloadContentsWithMeta after making changes to a file, I consistently receive outdated content. I need to wait several minutes before calling this method again to retrieve the latest changes.
Upon investigation, I discovered that the issue originates from GitHub's side. The DownloadContentsWithMeta method uses a direct download link to fetch raw content from this URL: https://raw.githubusercontent.com/. If you attempt to access the raw content immediately after modifying a file, you will encounter the same problem.
However, perhaps we can implement a workaround on our side — for example, by adding some parameters to the URL or using a different method to bypass caching.
I also found a related bug reported in the GitHub community: https://github.com/orgs/community/discussions/46691. As of now, it remains unresolved.
Suggestions:
- Investigate if adding cache-busting parameters (e.g., timestamps or unique query strings) to the download URL forces GitHub to return the latest version.
- Explore using other link/API to fetch the most recent file contents.