Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 73f969c

Browse files
author
dksimpson
committedMar 27, 2018
Task 1060: Update articles for using both caching rules and rules engine to enable DSA caching
1 parent 26ee1ba commit 73f969c

File tree

4 files changed

+34
-20
lines changed

4 files changed

+34
-20
lines changed
 

‎articles/cdn/cdn-caching-rules.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Control Azure Content Delivery Network caching behavior with caching rules | Microsoft Docs
3-
description: 'You can use CDN caching rules to set or modify default cache expiration behavior both globally and with conditions, such as a URL path and file extensions.'
2+
title: Control Azure CDN caching behavior with caching rules | Microsoft Docs
3+
description: You can use CDN caching rules to set or modify default cache expiration behavior both globally and with conditions, such as a URL path and file extensions.
44
services: cdn
55
documentationcenter: ''
66
author: dksimpson
@@ -18,7 +18,7 @@ ms.author: v-deasim
1818

1919
---
2020

21-
# Control Azure Content Delivery Network caching behavior with caching rules
21+
# Control Azure CDNk caching behavior with caching rules
2222

2323
> [!NOTE]
2424
> Caching rules are available only for **Azure CDN from Verizon Standard** and **Azure CDN from Akamai Standard**. For **Azure CDN from Verizon Premium**, you can use the [Azure CDN rules engine](cdn-rules-engine.md) in the **Manage** portal for similar functionality.
@@ -38,11 +38,11 @@ For information about default caching behavior and caching directive headers, se
3838
How to set CDN caching rules:
3939

4040
1. Open the Azure portal, select a CDN profile, then select an endpoint.
41-
2. In the left pane under Settings, click **Caching rules**.
41+
2. In the left pane under Settings, select **Caching rules**.
4242

4343
![CDN Caching rules button](./media/cdn-caching-rules/cdn-caching-rules-btn.png)
4444

45-
1. Create a global caching rule as follows:
45+
3. Create a global caching rule as follows:
4646
1. Under **Global caching rules**, set **Query string caching behavior** to **Ignore query strings**.
4747
2. Set **Caching behavior** to **Set if missing**.
4848

@@ -60,6 +60,7 @@ How to set CDN caching rules:
6060

6161
![Custom caching rules](./media/cdn-caching-rules/cdn-custom-caching-rules.png)
6262

63+
6364
> [!NOTE]
6465
> Files that are cached before a rule change maintain their origin cache duration setting. To reset their cache durations, you must [purge the file](cdn-purge-endpoint.md). For **Azure CDN from Verizon** endpoints, it can take up to 90 minutes for caching rules to take effect.
6566

‎articles/cdn/cdn-dynamic-site-acceleration.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Dynamic site acceleration via Azure CDN
3-
description: Dynamic site acceleration deep dive
3+
description: Azure CDN supports dynamic site acceleration (DSA) optimization for files with dynamic content.
44
services: cdn
55
documentationcenter: ''
66
author: dksimpson
@@ -148,19 +148,32 @@ With DSA, caching is turned off by default on the CDN, even when the origin incl
148148

149149
If you have a website with a mix of static and dynamic assets, it is best to take a hybrid approach to get the best performance.
150150

151-
For **Azure CDN from Verizon Premium** profiles, you can turn on caching for specific cases by using the [rules engine](cdn-rules-engine.md) for DSA endpoints. Any rules that are created affect only those endpoints of your profile that are optimized for DSA.
151+
For **Azure CDN from Verizon Standard** and **Azure CDN from Akamai Standard** profiles, you can turn on caching for specific DSA endpoints by using [caching rules](cdn-caching-rules.md).
152152

153-
To access the rules engine for DSA endpoints:
153+
To access caching rules:
154+
155+
1. From the **CDN profile** page, under settings, select **Caching rules**
156+
157+
![CDN Caching rules button](./media/cdn-dynamic-site-acceleration/cdn-caching-rules-btn.png)
158+
159+
The **Caching rules** page opens.
160+
161+
2. Create a global or custom caching rule to turn on caching for your DSA endpoint.
162+
163+
For **Azure CDN from Verizon Premium** profiles only, you turn on caching for specific DSA endpoints by using the [rules engine](cdn-rules-engine.md). Any rules that are created affect only those endpoints of your profile that are optimized for DSA.
164+
165+
To access the rules engine:
154166

155167
1. From the **CDN profile** page, select **Manage**
156168

157-
![CDN profile manage button](./media/cdn-rules-engine/cdn-manage-btn.png)
169+
![CDN profile manage button](./media/cdn-dynamic-site-acceleration/cdn-manage-btn.png)
158170

159171
The CDN management portal opens.
160172

161173
2. From the CDN management portal, select **ADN**, then select **Rules Engine**.
162174

163-
![Rules engine for DSA](./media/cdn-rules-engine/cdn-dsa-rules-engine.png)
175+
![Rules engine for DSA](./media/cdn-dynamic-site-acceleration/cdn-dsa-rules-engine.png)
176+
164177

165178

166179
Alternatively, you can use two CDN endpoints: one endpoint optimized with DSA to deliver dynamic assets and another endpoint optimized with a static optimization type, such as general web delivery, to delivery cacheable assets. Modify your webpage URLs to link directly to the asset on the CDN endpoint you plan to use.

‎articles/cdn/cdn-how-caching-works.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How caching works | Microsoft Docs
3-
description: 'Caching is the process of storing data locally so that future requests for that data can be accessed more quickly.'
3+
description: Caching is the process of storing data locally so that future requests for that data can be accessed more quickly.
44
services: cdn
55
documentationcenter: ''
66
author: dksimpson
@@ -61,11 +61,11 @@ Two headers can be used to define cache freshness: `Cache-Control` and `Expires`
6161
## Cache-directive headers
6262

6363
> [!IMPORTANT]
64-
> By default, an Azure CDN endpoint that is optimized for DSA ignores cache-directive headers and bypasses caching. You can adjust how an Azure CDN endpoint treats these headers by using CDN caching rules to enable caching. For more information, see [Control Azure CDN caching behavior with caching rules](cdn-caching-rules.md).
64+
> By default, an Azure CDN endpoint that is optimized for DSA ignores cache-directive headers and bypasses caching. For **Azure CDN from Verizon Standard** and **Azure CDN from Akamai Standard** profiles, you can adjust how an Azure CDN endpoint treats these headers by using [CDN caching rules](cdn-caching-rules.md) to enable caching. For **Azure CDN from Verizon** profiles only, you use the [rules engine](cdn-rules-engine.md) to enable caching.
6565
6666
Azure CDN supports the following HTTP cache-directive headers, which define cache duration and cache sharing:
6767

68-
`Cache-Control`
68+
**Cache-Control:**
6969
- Introduced in HTTP 1.1 to give web publishers more control over their content and to address the limitations of the `Expires` header.
7070
- Overrides the `Expires` header, if both it and `Cache-Control` are defined.
7171
- When used in a request header, `Cache-Control` is ignored by Azure CDN, by default.
@@ -76,37 +76,37 @@ Azure CDN supports the following HTTP cache-directive headers, which define cach
7676
- `no-cache`: Cache the content, but validate the content every time before delivering it from the cache. Equivalent to `Cache-Control: max-age=0`.
7777
- `no-store`: Never cache the content. Remove content if it has been previously stored.
7878

79-
`Expires`
79+
**Expires:**
8080
- Legacy header introduced in HTTP 1.0; supported for backwards compatibility.
8181
- Uses a date-based expiration time with second precision.
8282
- Similar to `Cache-Control: max-age`.
8383
- Used when `Cache-Control` doesn't exist.
8484

85-
`Pragma`
85+
**Pragma:**
8686
- Not honored by Azure CDN, by default.
8787
- Legacy header introduced in HTTP 1.0; supported for backwards compatibility.
8888
- Used as a client request header with the following directive: `no-cache`. This directive instructs the server to deliver a fresh version of the resource.
8989
- `Pragma: no-cache` is equivalent to `Cache-Control: no-cache`.
9090

9191
## Validators
9292

93-
When the cache is stale, HTTP cache validators are used to compare the cached version of a file with the version on the origin server. **Azure CDN from Verizon** supports both ETag and Last-Modified validators by default, while **Azure CDN from Akamai** supports only Last-Modified by default.
93+
When the cache is stale, HTTP cache validators are used to compare the cached version of a file with the version on the origin server. **Azure CDN from Verizon** supports both `ETag` and `Last-Modified` validators by default, while **Azure CDN from Akamai** supports only `Last-Modified` by default.
9494

95-
`ETag`
95+
**ETag:**
9696
- **Azure CDN from Verizon** uses `ETag` by default while **Azure CDN from Akamai** does not.
9797
- `ETag` defines a string that is unique for every file and version of a file. For example, `ETag: "17f0ddd99ed5bbe4edffdd6496d7131f"`.
9898
- Introduced in HTTP 1.1 and is more current than `Last-Modified`. Useful when the last modified date is difficult to determine.
9999
- Supports both strong validation and weak validation; however, Azure CDN supports only strong validation. For strong validation, the two resource representations must be byte-for-byte identical.
100100
- A cache validates a file that uses `ETag` by sending an `If-None-Match` header with one or more `ETag` validators in the request. For example, `If-None-Match: "17f0ddd99ed5bbe4edffdd6496d7131f"`. If the server’s version matches an `ETag` validator on the list, it sends status code 304 (Not Modified) in its response. If the version is different, the server responds with status code 200 (OK) and the updated resource.
101101

102-
`Last-Modified`
103-
- For **Azure CDN from Verizon only**, Last-Modified is used if ETag is not part of the HTTP response.
102+
**Last-Modified:**
103+
- For **Azure CDN from Verizon only**, `Last-Modified` is used if `ETag` is not part of the HTTP response.
104104
- Specifies the date and time that the origin server has determined the resource was last modified. For example, `Last-Modified: Thu, 19 Oct 2017 09:28:00 GMT`.
105105
- A cache validates a file using `Last-Modified` by sending an `If-Modified-Since` header with a date and time in the request. The origin server compares that date with the `Last-Modified` header of the latest resource. If the resource has not been modified since the specified time, the server returns status code 304 (Not Modified) in its response. If the resource has been modified, the server returns status code 200 (OK) and the updated resource.
106106

107107
## Determining which files can be cached
108108

109-
Not all resources can be cached. The following table shows what resources can be cached, based on the type of HTTP response. Resources delivered with HTTP responses that don't meet all of these conditions cannot be cached. For **Azure CDN from Verizon Premium** only, you can use the Rules Engine to customize some of these conditions.
109+
Not all resources can be cached. The following table shows what resources can be cached, based on the type of HTTP response. Resources delivered with HTTP responses that don't meet all of these conditions cannot be cached. For **Azure CDN from Verizon Premium** only, you can use the rules engine to customize some of these conditions.
110110

111111
| | Azure CDN from Verizon | Azure CDN from Akamai |
112112
|------------------ |------------------------|----------------------------------|
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.