Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ head:

---

To enable edge caching for a [Cloudflare R2](/r2/) bucket, make sure your bucket is public and accessible by the Cache. This can be done by creating a [Custom Domain](/r2/buckets/public-buckets/#custom-domains). Follow these steps to set up a Custom Domain for your bucket:
To enable caching for a [Cloudflare R2](/r2/) bucket, make sure your bucket is public and accessible by the Cache. This can be done by creating a [Custom Domain](/r2/buckets/public-buckets/#custom-domains). Follow these steps to set up a Custom Domain for your bucket:

1. Go to **R2** and select your bucket.
2. On the bucket page, select **Settings**.
Expand All @@ -19,6 +19,12 @@ To enable edge caching for a [Cloudflare R2](/r2/) bucket, make sure your bucket

This will generate a publicly available CNAME in the format `[name].domain.com`.

## Tiered Cache

By default Cloudflare will cache R2 content based on [cache rules](/cache/how-to/cache-rules/) at the Edge only.

Tiered cache can be enabled by configuring [Smart Tiered Cache](/cache/how-to/tiered-cache/#smart-tiered-cache) which will select an Upper Tier data center next to your R2 bucket for optimal performance.

## Additional considerations

- Apply access controls to your newly public bucket. Refer to [Control cache access with WAF and Snippets](/cache/interaction-cloudflare-products/waf-snippets/) for more information.
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/r2/buckets/public-buckets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Currently, public buckets do not let you list the bucket contents at the root of

Domain access through a custom domain allows you to use [Cloudflare Cache](/cache/) to accelerate access to your R2 bucket.

Configure your cache to use [Smart Tiered Cache](/cache/how-to/tiered-cache/#smart-tiered-cache) to have a single upper tier data center next to your R2 bucket.

:::note

By default, only certain file types are cached. To cache all files in your bucket, you must set a Cache Everything page rule. For more information on default Cache behavior and how to customize it, refer to [Default Cache Behavior](/cache/concepts/default-cache-behavior/#default-cached-file-extensions)
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/r2/platform/limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Limits specified in MiB (mebibyte), GiB (gibibyte), or TiB (tebibyte) are storag

## Caching

Currently Cloudflare's [Tiered Cache](/cache/how-to/tiered-cache/) feature is not compatible with responses from R2. These responses will act as if Tiered Cache is not configured.
Optimize edge caching for your R2 content by enabling **Cache Everything** or setting more specific cache rules. Further refine cache levels by enabling [Tiered Cache](/cache/how-to/tiered-cache/).
Loading