cloudfoundry / cloudfoundry/cli
Consider use of `Cache-control` headers
@a-b is already working on this.
Since Oct 3, 2024.
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 990
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 8
Description
Some tasks, performed by the CLI such as those involved in cf push, involve starting a job, then polling for completion, or more generally for a change of state, until it's done.
If an intermediate shared (or private) HTTP cache presents out of date results, this can result in unpredictable behaviour by the CLI.
Has the use of adding a Cache-control: no-cache header to requests generated by the CLI been considered?
While I realize that a correctly operating shared cache should not normally cache requests that have an Authorization header (such as those generated by the CLI), a private cache is permitted to cache GET requests, so it might be good to be explicit that we're always looking for a non-cached result.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.