You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/frontdoor/front-door-caching.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,17 +23,17 @@ Only requests that use the `GET` request method are cacheable. All other request
23
23
24
24
## Delivery of large files
25
25
26
-
Azure Front Door delivers large files without a cap on file size. If caching is enabled, Front Door uses a technique called *object chunking*. When a large file is requested, Front Door retrieves smaller pieces of the file from the origin. After receiving a full or byte-range file request, the Front Door environment requests the file from the origin in chunks of 8 MB.
26
+
Azure Front Door delivers large files without a cap on file size. If caching is enabled, Front Door uses a technique called *object chunking*. When a large file is requested, Front Door retrieves smaller pieces of the file from the origin. After receiving a full file request or byte-range file request, the Azure Front Door environment requests the file from the origin in chunks of 8 MB.
27
27
28
-
After the chunk arrives at the Front Door environment, it's cached and immediately served to the user. Front Door then pre-fetches the next chunk in parallel. This pre-fetch ensures that the content stays one chunk ahead of the user, which reduces latency. This process continues until the entire file gets downloaded (if requested) or the client closes the connection. For more information on the byte-range request, read [RFC 7233](https://www.rfc-editor.org/info/rfc7233).
28
+
After the chunk arrives at the Azure Front Door environment, it's cached and immediately served to the user. Front Door then pre-fetches the next chunk in parallel. This pre-fetch ensures that the content stays one chunk ahead of the user, which reduces latency. This process continues until the entire file gets downloaded (if requested) or the client closes the connection. For more information on the byte-range request, read [RFC 7233](https://www.rfc-editor.org/info/rfc7233).
29
29
30
30
Front Door caches any chunks as they're received so the entire file doesn't need to be cached on the Front Door cache. Subsequent requests for the file or byte ranges are served from the cache. If the chunks aren't all cached, pre-fetching is used to request chunks from the origin.
31
31
32
32
This optimization relies on the origin's ability to support byte-range requests. If the origin doesn't support byte-range requests, or if it doesn't handle range requests correctly, then this optimization isn't effective.
33
33
34
34
When your origin responds to a request with a `Range` header, it must respond in one of the following ways:
35
35
36
-
-**Return a ranged response.** The response must use HTTP status code 206. Also, the `Content-Range` response header must be present, and must match the actual length of the content that your origin returns. If your origin doesn't send the correct response headers with valid values, Azure Front Door won't cache the response and you might see inconsistent behavior.
36
+
-**Return a ranged response.** The response must use HTTP status code 206. Also, the `Content-Range` response header must be present, and must match the actual length of the content that your origin returns. If your origin doesn't send the correct response headers with valid values, Azure Front Door doesn't cache the response, and you might see inconsistent behavior.
37
37
38
38
> [!TIP]
39
39
> If your origin compresses the response, ensure that the `Content-Range` header value matches the actual length of the compressed response.
@@ -165,7 +165,7 @@ These formats are supported in the lists of paths to purge:
165
165
> **Purging wildcard domains**: Specifying cached paths for purging as discussed in this section doesn't apply to any wildcard domains that are associated with the Front Door. Currently, we don't support directly purging wildcard domains. You can purge paths from specific subdomains by specifying that specfic subdomain and the purge path. For example, if my Front Door has `*.contoso.com`, I can purge assets of my subdomain `foo.contoso.com` by typing `foo.contoso.com/path/*`. Currently, specifying host names in the purge content path is limited to subdomains of wildcard domains, if applicable.
166
166
>
167
167
168
-
Cache purges on the Front Door are case-insensitive. Additionally, they're query string agnostic, meaning purging a URL will purge all query-string variations of it.
168
+
Cache purges on the Front Door are case-insensitive. Additionally, they're query string agnostic, which means that purging a URL purges all querystring variations of it.
169
169
170
170
::: zone-end
171
171
@@ -201,8 +201,8 @@ If the origin response is cacheable, then the `Set-Cookie` header is removed bef
201
201
202
202
In addition, Front Door attaches the `X-Cache` header to all responses. The `X-Cache` response header includes one of the following values:
203
203
204
-
-`TCP_HIT` or `TCP_REMOTE_HIT`: The first 8MB chunk of the response is a cache hit, and the content is served from the Front Door cache.
205
-
-`TCP_MISS`: The first 8MB chunk of the response is a cache miss, and the content is fetched from the origin.
204
+
-`TCP_HIT` or `TCP_REMOTE_HIT`: The first 8 MB chunk of the response is a cache hit, and the content is served from the Front Door cache.
205
+
-`TCP_MISS`: The first 8 MB chunk of the response is a cache miss, and the content is fetched from the origin.
206
206
-`PRIVATE_NOSTORE`: Request can't be cached because the *Cache-Control* response header is set to either *private* or *no-store*.
207
207
-`CONFIG_NOCACHE`: Request is configured to not cache in the Front Door profile.
208
208
@@ -222,7 +222,7 @@ Cache behavior and duration can be configured in Rules Engine. Rules Engine cach
222
222
223
223
***When caching is disabled**, Azure Front Door doesn’t cache the response contents, irrespective of the origin response directives.
224
224
225
-
***When caching is enabled**, the cache behavior is different based on the cache behavior value applied by the Rules Engine:
225
+
***When caching is enabled**, the cache behavior differs based on the cache behavior value applied by the Rules Engine:
226
226
227
227
***Honor origin**: Azure Front Door will always honor origin response header directive. If the origin directive is missing, Azure Front Door will cache contents anywhere from one to three days.
228
228
***Override always**: Azure Front Door will always override with the cache duration, meaning that it will cache the contents for the cache duration ignoring the values from origin response directives. This behavior will only be applied if the response is cacheable.
0 commit comments