From c61660bbc327f3fa843e2052d7e5e7256b9cb967 Mon Sep 17 00:00:00 2001 From: angelampcosta <92738954+angelampcosta@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:01:45 +0100 Subject: [PATCH] [Cache] Updates cache purge (#16945) * Updates cache purge * Fixes typo * Apply suggestions from code review Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Apply suggestions from code review * Update src/content/docs/cache/how-to/purge-cache/index.mdx --------- Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> --- .../cache/advanced-configuration/cache-reserve.mdx | 2 +- src/content/docs/cache/how-to/purge-cache/index.mdx | 2 +- .../cache/how-to/purge-cache/purge-by-hostname.mdx | 2 +- .../cache/how-to/purge-cache/purge-by-single-file.mdx | 2 +- .../docs/cache/how-to/purge-cache/purge-by-tags.mdx | 4 ++-- .../docs/cache/how-to/purge-cache/purge-cache-key.mdx | 10 +++++----- .../docs/cache/how-to/purge-cache/purge-everything.mdx | 2 +- .../cache/how-to/purge-cache/purge-varied-images.mdx | 2 +- .../docs/cache/how-to/purge-cache/purge_by_prefix.mdx | 4 ++-- src/content/docs/cache/index.mdx | 2 +- src/content/docs/cache/reference/development-mode.mdx | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/content/docs/cache/advanced-configuration/cache-reserve.mdx b/src/content/docs/cache/advanced-configuration/cache-reserve.mdx index 4b793b08152775..7673cd8321e1b5 100644 --- a/src/content/docs/cache/advanced-configuration/cache-reserve.mdx +++ b/src/content/docs/cache/advanced-configuration/cache-reserve.mdx @@ -121,7 +121,7 @@ Class B operations are performed when data needs to be fetched from Cache Reserv Asset purges are free operations. -Cache Reserve will also be purged along with edge cache when you send a purge by URL request. +Cache Reserve will be instantly purged along with edge cache when you send a purge by URL request. Other purge methods, such as purge by tag, host, prefix, or purge everything will force an attempt to revalidate on the subsequent request for the Cache Reserve asset. Note that assets purged this way will still incur storage costs until their retention TTL expires. diff --git a/src/content/docs/cache/how-to/purge-cache/index.mdx b/src/content/docs/cache/how-to/purge-cache/index.mdx index 9299302ad54ac3..85374c528234bf 100644 --- a/src/content/docs/cache/how-to/purge-cache/index.mdx +++ b/src/content/docs/cache/how-to/purge-cache/index.mdx @@ -6,7 +6,7 @@ pcx_content_type: concept import { DirectoryListing, FeatureTable } from "~/components" -Cloudflare offers different options to purge your content. Although single-file cache purging (purge by URL) is recommended, the following options are also available: +Cloudflare's Instant Purge ensures that updates to your content are reflected immediately. Multiple options are available for purging content, with single-file cache purging (purge by URL) being the recommended method. However, the following additional options are also available: diff --git a/src/content/docs/cache/how-to/purge-cache/purge-by-hostname.mdx b/src/content/docs/cache/how-to/purge-cache/purge-by-hostname.mdx index ad5b84912cefa8..f278c2c5bd9b7f 100644 --- a/src/content/docs/cache/how-to/purge-cache/purge-by-hostname.mdx +++ b/src/content/docs/cache/how-to/purge-cache/purge-by-hostname.mdx @@ -6,7 +6,7 @@ sidebar: --- -Purging by hostname means that all assets at URLs with a host that matches one of the provided values will be purged from the cache. +Purging by hostname means that all assets at URLs with a host that matches one of the provided values will be instantly purged from the cache. 1. Log in to your [Cloudflare dashboard](https://dash.cloudflare.com/login), and select your account and domain. 2. Select **Caching** > **Configuration**. diff --git a/src/content/docs/cache/how-to/purge-cache/purge-by-single-file.mdx b/src/content/docs/cache/how-to/purge-cache/purge-by-single-file.mdx index 952a4103e29416..8cf8f3a2093690 100644 --- a/src/content/docs/cache/how-to/purge-cache/purge-by-single-file.mdx +++ b/src/content/docs/cache/how-to/purge-cache/purge-by-single-file.mdx @@ -6,7 +6,7 @@ sidebar: --- -With purge by single-file, cached resources are immediately removed from the stored assets in your Content Delivery Network (CDN) across all data centers. New requests for the purged asset receive the latest version from your origin web server and add it back to your CDN cache within the specific Cloudflare data center that served the request. +With purge by single-file, cached resources are instantly removed from the stored assets in your Content Delivery Network (CDN) across all data centers. New requests for the purged asset receive the latest version from your origin web server and add it back to your CDN cache within the specific Cloudflare data center that served the request. The single-file purge rate limit for the Free subscription is 1,000 URLs/minute. The rate limit is subject to change. For Zones on Free/Pro/Business plan, you may purge up to 30 URLs in one API call. For Zones on Enterprise plan, you may purge up to 500 URLs in one API call. diff --git a/src/content/docs/cache/how-to/purge-cache/purge-by-tags.mdx b/src/content/docs/cache/how-to/purge-cache/purge-by-tags.mdx index 3321f513990897..8470bbb922c458 100644 --- a/src/content/docs/cache/how-to/purge-cache/purge-by-tags.mdx +++ b/src/content/docs/cache/how-to/purge-cache/purge-by-tags.mdx @@ -6,14 +6,14 @@ sidebar: --- -Cache-tag purging makes multi-file purging easier because you can bulk purge by adding cache-tags to your assets, such as webpages, image files, and more. Note that Tag, Hostname and Prefix purges are only available for Enterprise customers. +Cache-tag purging makes multi-file purging easier because you can instantly bulk purge by adding cache-tags to your assets, such as webpages, image files, and more. Note that Tag, Hostname and Prefix purges are only available for Enterprise customers. ## General workflow for cache-tags 1. Add tags to the `Cache-Tag` HTTP response header from your origin web server for your web content, such as pages, static assets, etc. 2. [Ensure your web traffic is proxied](/dns/manage-dns-records/reference/proxied-dns-records/) through Cloudflare. 3. Cloudflare associates the tags in the `Cache-Tag` HTTP header with the content being cached. -4. Use specific cache-tags to purge your Cloudflare CDN cache of all content containing that cache-tag from your dashboard or [using our API](/api/operations/zone-purge). +4. Use specific cache-tags to instantly purge your Cloudflare CDN cache of all content containing that cache-tag from your dashboard or [using our API](/api/operations/zone-purge). 5. Cloudflare forces a [cache MISS](/cache/concepts/cache-responses/#miss) on content with the purged cache-tag. :::caution[Warning] diff --git a/src/content/docs/cache/how-to/purge-cache/purge-cache-key.mdx b/src/content/docs/cache/how-to/purge-cache/purge-cache-key.mdx index 827432c3cb4ea9..5db7b46ab196b2 100644 --- a/src/content/docs/cache/how-to/purge-cache/purge-cache-key.mdx +++ b/src/content/docs/cache/how-to/purge-cache/purge-cache-key.mdx @@ -6,17 +6,17 @@ sidebar: --- -Purge resources that use Cache Keys via the [Cloudflare API](/api/operations/zone-purge). If you use [Cloudflare’s Purge by URL](/api/operations/zone-purge#purge-cached-content-by-url), include the headers and query strings that are in your custom Cache Key. +Instantly purge resources that use Cache Keys via the [Cloudflare API](/api/operations/zone-purge). If you use [Cloudflare's Purge by URL](/api/operations/zone-purge#purge-cached-content-by-url), include the headers and query strings that are in your custom Cache Key. Currently, it is not possible to purge a URL stored through Cache API that uses a custom cache key set by a Worker. Instead, use a [custom key created by Cache Rules](/cache/how-to/cache-rules/settings/#cache-key). Alternatively, purge your assets using purge everything, purge by tag, purge by host or purge by prefix. -To purge `device_type`, `geo`, or `lang` use `CF-Device-Type`, `CF-IPCountry` or `accept-language`, respectively. [Purge by Tag / Host](/api/operations/zone-purge#purge-cached-content-by-tag-host-or-prefix) and [Purge Everything](/api/operations/zone-purge#purge-all-cached-content) are not impacted by the use of custom Cache Keys. +To instantly purge by `device_type`, `geo`, or `lang` use `CF-Device-Type`, `CF-IPCountry` or `accept-language`, respectively. [Purge by Tag / Host](/api/operations/zone-purge#purge-cached-content-by-tag-host-or-prefix) and [Purge Everything](/api/operations/zone-purge#purge-all-cached-content) are not impacted by the use of custom Cache Keys. ## Purge by device type For a Cache Key based on device type, purge the asset by passing the `CF-Device-Type` header with the API purge request (valid headers include mobile, desktop, and tablet). -Refer to the example API request below to purge all mobile assets on the root webpage. +Refer to the example API request below to instantly purge all mobile assets on the root webpage. ```bash curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache" \ @@ -28,7 +28,7 @@ curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache" \ ## Purge by geo -Purge resources for a location-based Cache Key by specifying the two-letter country code. Spain is used in the example below. +Instantly purge resources for a location-based Cache Key by specifying the two-letter country code. Spain is used in the example below. ```bash curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache" \ @@ -40,7 +40,7 @@ curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache" \ ## Purge by language -For a Cache Key based on language, purge the asset by passing the `accept-language` header. Refer to the example API request below to purge all assets in Chinese (PRC). +For a Cache Key based on language, purge the asset by passing the `accept-language` header. Refer to the example API request below to instantly purge all assets in Chinese (PRC). ```bash curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache" \ diff --git a/src/content/docs/cache/how-to/purge-cache/purge-everything.mdx b/src/content/docs/cache/how-to/purge-cache/purge-everything.mdx index 152c269c5d7475..6b1ba5f5372621 100644 --- a/src/content/docs/cache/how-to/purge-cache/purge-everything.mdx +++ b/src/content/docs/cache/how-to/purge-cache/purge-everything.mdx @@ -8,7 +8,7 @@ sidebar: To maintain optimal site performance, Cloudflare strongly recommends using single-file (by URL) purging instead of a complete cache purge. -Purging everything immediately clears all resources from your CDN cache in all Cloudflare data centers. Each new request for a purged resource returns to your origin server to validate the resource. If Cloudflare cannot validate the resource, Cloudflare fetches the latest version from the origin server and replaces the cached version. When a site with heavy traffic contains a lot of assets, requests to your origin server can increase substantially and result in slow site performance. +Purging everything instantly clears all resources from your CDN cache in all Cloudflare data centers. Each new request for a purged resource returns to your origin server to validate the resource. If Cloudflare cannot validate the resource, Cloudflare fetches the latest version from the origin server and replaces the cached version. When a site with heavy traffic contains a lot of assets, requests to your origin server can increase substantially and result in slow site performance. 1. Log in to your [Cloudflare dashboard](https://dash.cloudflare.com/login), and select your account and domain. 2. Select **Caching** > **Configuration**. diff --git a/src/content/docs/cache/how-to/purge-cache/purge-varied-images.mdx b/src/content/docs/cache/how-to/purge-cache/purge-varied-images.mdx index 8156a42edb7b40..544ed07042fee1 100644 --- a/src/content/docs/cache/how-to/purge-cache/purge-varied-images.mdx +++ b/src/content/docs/cache/how-to/purge-cache/purge-varied-images.mdx @@ -6,4 +6,4 @@ sidebar: --- -Purging varied images purges all content variants for that URL. This behavior occurs so that if an image changes, you can easily update the cache with a single purge request instead of trying to determine the potential number of out-of-date variants. The behavior is true regardless of purge type used, such as single file, tag, or hostname. +Purging varied images instantly purges all content variants for that URL. This behavior occurs so that if an image changes, you can easily update the cache with a single purge request instead of trying to determine the potential number of out-of-date variants. The behavior is true regardless of purge type used, such as single file, tag, or hostname. diff --git a/src/content/docs/cache/how-to/purge-cache/purge_by_prefix.mdx b/src/content/docs/cache/how-to/purge-cache/purge_by_prefix.mdx index e6d36e41ba09c2..f495d6c8e9e415 100644 --- a/src/content/docs/cache/how-to/purge-cache/purge_by_prefix.mdx +++ b/src/content/docs/cache/how-to/purge-cache/purge_by_prefix.mdx @@ -6,7 +6,7 @@ sidebar: --- -Enterprise customers can purge their cache by URL prefix or path separators in their URL. For an example URL like `https://www.example.com/foo/bar/baz/qux.jpg`, valid purge requests include: +Enterprise customers can instantly purge their cache by URL prefix or path separators in their URL. For an example URL like `https://www.example.com/foo/bar/baz/qux.jpg`, valid purge requests include: * `www.example.com` * `www.example.com/foo` @@ -129,4 +129,4 @@ Take the following website as an example: `https://cloudflare.com/انشاء-م -As shown above, with URL normalization **ON**, visitors to the two URLs, `https://cloudflare.com/%D8%A7%D9%86%D8%B4%D8%A7%D8%A1-%D9%85%D9%88%D9%82%D8%B9-%D8%A7%D9%84%D9%83%D8%AA%D8%B1%D9%88%D9%86%D9%8A/img_1.jpg` and `https://cloudflare.com/انشاء-موقع-الكتروني/img_1.jpg`, will be served the same cached asset. Purging `https://cloudflare.com/%D8%A7%D9%86%D8%B4%D8%A7%D8%A1-%D9%85%D9%88%D9%82%D8%B9-%D8%A7%D9%84%D9%83%D8%AA%D8%B1%D9%88%D9%86%D9%8A/img_1.jpg` will purge that asset for both visitors. +As shown above, with URL normalization **ON**, visitors to the two URLs, `https://cloudflare.com/%D8%A7%D9%86%D8%B4%D8%A7%D8%A1-%D9%85%D9%88%D9%82%D8%B9-%D8%A7%D9%84%D9%83%D8%AA%D8%B1%D9%88%D9%86%D9%8A/img_1.jpg` and `https://cloudflare.com/انشاء-موقع-الكتروني/img_1.jpg`, will be served the same cached asset. Purging `https://cloudflare.com/%D8%A7%D9%86%D8%B4%D8%A7%D8%A1-%D9%85%D9%88%D9%82%D8%B9-%D8%A7%D9%84%D9%83%D8%AA%D8%B1%D9%88%D9%86%D9%8A/img_1.jpg` will instantly purge that asset for both visitors. diff --git a/src/content/docs/cache/index.mdx b/src/content/docs/cache/index.mdx index 4d2d2c8739c061..5becb59f6cfaf6 100644 --- a/src/content/docs/cache/index.mdx +++ b/src/content/docs/cache/index.mdx @@ -54,7 +54,7 @@ Use Cloudflare's persistent storage to increase cache times. -Clear cached files to force Cloudflare to fetch a fresh version of those files from your web server. You can purge files selectively or all at once. +Instantly purge cached files to force Cloudflare to fetch fresh versions from your web server files. You can purge specific files or all at once. diff --git a/src/content/docs/cache/reference/development-mode.mdx b/src/content/docs/cache/reference/development-mode.mdx index f9bf51bb57ee8a..39f1d83d19e703 100644 --- a/src/content/docs/cache/reference/development-mode.mdx +++ b/src/content/docs/cache/reference/development-mode.mdx @@ -13,7 +13,7 @@ To bypass cache for longer than three hours, use bypass cache in [Cache Rules](/ ## Enable Development Mode -Development Mode temporarily bypasses Cloudflare’s cache and does not purge cached files. To purge your Cloudflare cache, refer to [purge cache](/cache/how-to/purge-cache/). +Development Mode temporarily bypasses Cloudflare's cache and does not purge cached files. To instantly purge your Cloudflare cache, refer to [purge cache](/cache/how-to/purge-cache/). 1. Log in to your Cloudflare account. 2. Select your domain.