Skip to content

[Bug]: bcr.bazel.build serves content with Cache-Control: no-cache #9222

Description

@gholms

What happened?

When bcr_postsubmit.py uploads registry content to gcloud it passes -h Cache-Control:no-cache to gcutil, which causes bcr.bazel.build to instruct any caching proxies people are using to serve it internally to never cache anything. Since metadata.json (and technically bazel_registry.json) files are subject to change they probably shouldn't have very long max-age values, but everything else is supposed to be immutable and would probably benefit greatly from longer cache times.

Version

Unusually, Bazel is completely uninvolved here, though when you do use it it ignores cache-control headers completely.

How to reproduce

% curl -I https://bcr.bazel.build/modules/zlib/1.3.2/MODULE.bazel | grep cache-control
cache-control: public,no-cache

Any other information?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions