cloudfoundry / cloudfoundry/cli

Consider use of `Cache-control` headers

Open
#1,385 5 comments 0 reactions 1 assignee View on GitHub

@a-b is already working on this.

Since Oct 3, 2024.

unscheduled
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.