Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docs for cache: no-store #17926

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

tewaro
Copy link
Contributor

@tewaro tewaro commented Nov 1, 2024

Summary

Update Documentation for adding cache: no-store.

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 1 total issue(s) found.


Note: We resolved prior Hyperlint review comments because:

We updated our inline suggestion AI.

We do this to avoid keeping outdated or irrelevant comments around. We'll leave a new review with current comments below.

src/content/compatibility-dates/cache-no-store.md Outdated Show resolved Hide resolved
@github-actions github-actions bot added the product:workers Related to Workers product label Nov 1, 2024
Copy link

cloudflare-workers-and-pages bot commented Nov 1, 2024

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9559fcc
Status: ✅  Deploy successful!
Preview URL: https://5a039c28.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://adityaatultewari-cache-no-st.cloudflare-docs-7ou.pages.dev

View logs

Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/content/compatibility-dates/cache-no-store.md Outdated Show resolved Hide resolved
src/content/docs/workers/examples/cache-using-fetch.mdx Outdated Show resolved Hide resolved
src/content/docs/workers/examples/cache-using-fetch.mdx Outdated Show resolved Hide resolved
src/content/docs/workers/examples/cache-using-fetch.mdx Outdated Show resolved Hide resolved
src/content/docs/workers/runtime-apis/request.mdx Outdated Show resolved Hide resolved
@irvinebroque irvinebroque marked this pull request as ready for review November 7, 2024 06:31

For a cross-zone request this simply specifies the headers `Pragma: no-cache` and `Cache-Control: no-cache` to the origin.

For grey-cloud subrequests this bypasses the Cloudflare's cache.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We sometimes use grey cloud in external docs, but for the most part I think we shouldn't. We know what it means internally, but average new user won't.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to do the same with cross-zone?

When `no-store` is supplied the cache is bypassed both on the way to the origin and on the way back.
For cross-zone requests this simply forwards the `Pragma: no-cache` and `Cache-Control: no-cache` headers to the origin.
This is because the cache is on the origin side for cross-zone requests.
For grey-cloud requests this bypasses the use of Cloudflare's caches.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting the other "grey-cloud" use (see above)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question here about cross-zone.

@tewaro tewaro force-pushed the AdityaAtulTewari/cache-no-store-update branch from b8d038f to f151c78 Compare November 11, 2024 15:46
@tewaro tewaro force-pushed the AdityaAtulTewari/cache-no-store-update branch 3 times, most recently from b9d12ae to f323be7 Compare November 11, 2024 15:52
@tewaro tewaro force-pushed the AdityaAtulTewari/cache-no-store-update branch 6 times, most recently from 62a4ca4 to f464845 Compare November 11, 2024 16:28
@tewaro tewaro force-pushed the AdityaAtulTewari/cache-no-store-update branch from f464845 to 6b48f86 Compare November 11, 2024 16:30
src/content/compatibility-dates/cache-no-store.md Outdated Show resolved Hide resolved
src/content/compatibility-dates/cache-no-store.md Outdated Show resolved Hide resolved
src/content/compatibility-dates/cache-no-store.md Outdated Show resolved Hide resolved
src/content/compatibility-dates/cache-no-store.md Outdated Show resolved Hide resolved
src/content/compatibility-dates/cache-no-store.md Outdated Show resolved Hide resolved
src/content/compatibility-dates/cache-no-store.md Outdated Show resolved Hide resolved
src/content/docs/workers/examples/cache-using-fetch.mdx Outdated Show resolved Hide resolved
src/content/docs/workers/examples/cache-using-fetch.mdx Outdated Show resolved Hide resolved
src/content/docs/workers/examples/cache-using-fetch.mdx Outdated Show resolved Hide resolved
@tewaro tewaro force-pushed the AdityaAtulTewari/cache-no-store-update branch 9 times, most recently from 2cfc3a4 to 0f090f6 Compare November 12, 2024 03:07
@tewaro tewaro force-pushed the AdityaAtulTewari/cache-no-store-update branch from 0f090f6 to 9559fcc Compare November 12, 2024 03:09
@tewaro tewaro requested review from mikenomitch and mhart November 12, 2024 03:09
Copy link
Contributor

@mikenomitch mikenomitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now - thanks for making the changes

@tewaro tewaro merged commit 80b2c1b into production Nov 12, 2024
13 checks passed
@tewaro tewaro deleted the AdityaAtulTewari/cache-no-store-update branch November 12, 2024 04:54
harshil1712 pushed a commit that referenced this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:workers Related to Workers product size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants