Skip to content

Bug: DownloadContentsWithMeta returns old content for a file #3566

@kuzminT

Description

@kuzminT

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions