From c13435fd6ea72ae64afde8e61992ed83c0c64f03 Mon Sep 17 00:00:00 2001 From: Angela Costa Date: Wed, 20 Nov 2024 17:25:15 +0000 Subject: [PATCH 1/2] Updates Tiered cache --- .../docs/cache/interaction-cloudflare-products/r2.mdx | 8 +++++++- src/content/docs/r2/buckets/public-buckets.mdx | 2 ++ src/content/docs/r2/platform/limits.mdx | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/content/docs/cache/interaction-cloudflare-products/r2.mdx b/src/content/docs/cache/interaction-cloudflare-products/r2.mdx index 9b5f81c69611cb..6dfcad8527c1d5 100644 --- a/src/content/docs/cache/interaction-cloudflare-products/r2.mdx +++ b/src/content/docs/cache/interaction-cloudflare-products/r2.mdx @@ -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**. @@ -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. diff --git a/src/content/docs/r2/buckets/public-buckets.mdx b/src/content/docs/r2/buckets/public-buckets.mdx index 92f09b3644d602..a280718552366a 100644 --- a/src/content/docs/r2/buckets/public-buckets.mdx +++ b/src/content/docs/r2/buckets/public-buckets.mdx @@ -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) diff --git a/src/content/docs/r2/platform/limits.mdx b/src/content/docs/r2/platform/limits.mdx index 803026114eff39..a0cc5ebce78b60 100644 --- a/src/content/docs/r2/platform/limits.mdx +++ b/src/content/docs/r2/platform/limits.mdx @@ -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/). From 727652a7aff613f6a5066176dc3ca906bdd081da Mon Sep 17 00:00:00 2001 From: Angela Costa Date: Wed, 20 Nov 2024 19:04:16 +0000 Subject: [PATCH 2/2] Removes cache from limits --- src/content/docs/r2/platform/limits.mdx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/content/docs/r2/platform/limits.mdx b/src/content/docs/r2/platform/limits.mdx index a0cc5ebce78b60..0c46f4f9e44ee4 100644 --- a/src/content/docs/r2/platform/limits.mdx +++ b/src/content/docs/r2/platform/limits.mdx @@ -34,7 +34,3 @@ Review the [Examples](/r2/examples/) on how to use the SDKs.
Limits specified in MiB (mebibyte), GiB (gibibyte), or TiB (tebibyte) are storage units of measurement based on base-2. 1 GiB (gibibyte) is equivalent to 230 bytes (or 10243 bytes). This is distinct from 1 GB (gigabyte), which is 109 bytes (or 10003 bytes). - -## Caching - -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/).