Skip to content

Commit 234ff0a

Browse files
committed
review-2
1 parent c815193 commit 234ff0a

11 files changed

+156
-156
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
### YamlMime:ModuleUnit
2-
uid: learn.azure.improve-api-performance-with-apim-caching-policy.1-introduction
3-
title: Introduction
4-
metadata:
5-
title: Introduction
6-
description: In this unit, you learn about a business problem that you can solve by using a caching policy in Azure API Management.
7-
ms.date: 07/11/2023
8-
author: dlepow
9-
ms.author: danlep
10-
ms.topic: unit
11-
durationInMinutes: 3
12-
content: |
13-
[!include[](includes/1-introduction.md)]
14-
1+
### YamlMime:ModuleUnit
2+
uid: learn.azure.improve-api-performance-with-apim-caching-policy.1-introduction
3+
title: Introduction
4+
metadata:
5+
title: Introduction
6+
description: In this unit, you learn about a business problem that you can solve by using a caching policy in Azure API Management.
7+
ms.date: 06/09/2025
8+
author: dlepow
9+
ms.author: danlep
10+
ms.topic: unit
11+
durationInMinutes: 3
12+
content: |
13+
[!include[](includes/1-introduction.md)]
14+
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
### YamlMime:ModuleUnit
2-
uid: learn.azure.improve-api-performance-with-apim-caching-policy.2-choose-the-right-api-management-policy
3-
title: Choose the right API Management policy
4-
metadata:
5-
title: Choose the right API Management policy
6-
description: In this unit, you learn about API Management policies and how to execute the on API requests.
7-
ms.date: 07/11/2023
8-
author: dlepow
9-
ms.author: danlep
10-
ms.topic: unit
11-
durationInMinutes: 7
12-
content: |
13-
[!include[](includes/2-choose-the-right-api-management-policy.md)]
14-
1+
### YamlMime:ModuleUnit
2+
uid: learn.azure.improve-api-performance-with-apim-caching-policy.2-choose-the-right-api-management-policy
3+
title: Choose the right API Management policy
4+
metadata:
5+
title: Choose the right API Management policy
6+
description: In this unit, you learn about API Management policies and how to execute the on API requests.
7+
ms.date: 06/09/2025
8+
author: dlepow
9+
ms.author: danlep
10+
ms.topic: unit
11+
durationInMinutes: 7
12+
content: |
13+
[!include[](includes/2-choose-the-right-api-management-policy.md)]
14+

learn-pr/azure/improve-api-performance-with-apim-caching-policy/3-knowledge-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Knowledge check
44
metadata:
55
title: Knowledge check
66
description: In this unit, you answer questions based on a scenario.
7-
ms.date: 07/12/2023
7+
ms.date: 06/09/2025
88
author: dlepow
99
ms.author: danlep
1010
ms.topic: unit
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
### YamlMime:ModuleUnit
2-
uid: learn.azure.improve-api-performance-with-apim-caching-policy.4-configure-a-caching-policy
3-
title: Configure a caching policy
4-
metadata:
5-
title: Configure a caching policy
6-
description: In this unit, you learn how to use the cache control policies in API Management to accelerate responses.
7-
ms.date: 07/12/2023
8-
author: dlepow
9-
ms.author: danlep
10-
ms.topic: unit
11-
durationInMinutes: 5
12-
content: |
13-
[!include[](includes/4-configure-a-caching-policy.md)]
14-
1+
### YamlMime:ModuleUnit
2+
uid: learn.azure.improve-api-performance-with-apim-caching-policy.4-configure-a-caching-policy
3+
title: Configure a caching policy
4+
metadata:
5+
title: Configure a caching policy
6+
description: In this unit, you learn how to use the cache control policies in API Management to accelerate responses.
7+
ms.date: 06/09/2025
8+
author: dlepow
9+
ms.author: danlep
10+
ms.topic: unit
11+
durationInMinutes: 5
12+
content: |
13+
[!include[](includes/4-configure-a-caching-policy.md)]
14+
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
### YamlMime:ModuleUnit
2-
uid: learn.azure.improve-api-performance-with-apim-caching-policy.5-exercise-configure-a-caching-policy
3-
title: Exercise - Configure a caching policy
4-
metadata:
5-
title: Exercise - Configure a caching policy
6-
description: In this unit, you create a new instance of API Management and configure it to use an external API cache.
7-
ms.date: 07/12/2023
8-
author: dlepow
9-
ms.author: danlep
10-
ms.topic: unit
11-
durationInMinutes: 25
12-
azureSandbox: false
13-
interactive: bash
14-
content: |
15-
[!include[](includes/5-exercise-configure-a-caching-policy.md)]
16-
1+
### YamlMime:ModuleUnit
2+
uid: learn.azure.improve-api-performance-with-apim-caching-policy.5-exercise-configure-a-caching-policy
3+
title: Exercise - Configure a caching policy
4+
metadata:
5+
title: Exercise - Configure a caching policy
6+
description: In this unit, you create a new instance of API Management and configure it to use an external API cache.
7+
ms.date: 06/09/2025
8+
author: dlepow
9+
ms.author: danlep
10+
ms.topic: unit
11+
durationInMinutes: 25
12+
azureSandbox: false
13+
interactive: bash
14+
content: |
15+
[!include[](includes/5-exercise-configure-a-caching-policy.md)]
16+
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
### YamlMime:ModuleUnit
2-
uid: learn.azure.improve-api-performance-with-apim-caching-policy.6-summary
3-
title: Summary
4-
metadata:
5-
title: Summary
6-
description: In this unit, you review what you have learned about API Management caching policies.
7-
ms.date: 07/12/2023
8-
author: dlepow
9-
ms.author: danlep
10-
ms.topic: unit
11-
durationInMinutes: 2
12-
content: |
13-
[!include[](includes/6-summary.md)]
14-
1+
### YamlMime:ModuleUnit
2+
uid: learn.azure.improve-api-performance-with-apim-caching-policy.6-summary
3+
title: Summary
4+
metadata:
5+
title: Summary
6+
description: In this unit, you review what you learned about API Management caching policies.
7+
ms.date: 06/09/2025
8+
author: dlepow
9+
ms.author: danlep
10+
ms.topic: unit
11+
durationInMinutes: 2
12+
content: |
13+
[!include[](includes/6-summary.md)]
14+

learn-pr/azure/improve-api-performance-with-apim-caching-policy/includes/2-choose-the-right-api-management-policy.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
You can use API Management policies to control the behavior of a deployed API without rewriting its code.
22

3-
In your board game company, you have a set of APIs that enable partner organizations to obtain price estimates, staff members to check stock levels, and customers to place orders. You want to address a particular issue with performance and investigate what else you can achieve with policies.
3+
In your board game company, your APIs enable partner organizations to obtain price estimates, staff members to check stock levels, and customers to place orders. You want to address a particular issue with performance and investigate what else you can achieve with policies.
44

55
First, let's look at what you can use policies to do.
66

77
## What are policies?
88

9-
In Azure API Management, administrators can use policies to alter the behavior of APIs through configuration. The primary functionality and behavior of an API is designed by the developers who write the code. However, administrators can use policies to set limits, convert response formats, or enforce security requirements. In this module, we concentrate on using policies to set up and control a cache.
9+
In Azure API Management, administrators can use policies to alter the behavior of APIs through configuration. Developers design the primary functionality and behavior of an API by writing code. However, administrators can use policies to set limits, convert response formats, or enforce security requirements. In this module, we concentrate on using policies to set up and control a cache.
1010

1111
Policies are made up of individual statements, which are executed in order. The policy documents are XML structures, which contain elements that you can use to control the behavior of the API.
1212

@@ -47,7 +47,7 @@ This policy also translates any outbound responses in JSON format into XML.
4747

4848
## Policy scopes
4949

50-
A policy's scope determines how broadly it's applied. The following are policy scopes from which you can choose:
50+
A policy scope determines how broadly the policy is applied. You can choose from the following policy scopes:
5151

5252
- Global
5353
- Product
@@ -105,7 +105,7 @@ Because the `<base>` tag appears above the `<find-and-replace>` tag, Azure API M
105105

106106
## Commonly used policies
107107

108-
Let's examine some things you can do with policies in API Management. We'll introduce some of the most commonly used policies, and you can visit the API Management documentation for a complete list and examples.
108+
Let's examine some things you can do with policies in API Management. Here, we introduce you to some of the most commonly used policies, and you can visit the API Management documentation for a complete list and examples.
109109

110110

111111
### Policies for restricting access
@@ -124,7 +124,7 @@ To allow or deny calls from specific IP addresses or ranges of IP addresses, use
124124

125125
Several policies enable you to control authentication. For example:
126126

127-
Use the **Authenticate with Basic** policy to enable authentication in plain text. This form of authentication is broadly supported, but remember that you should protect it with SSL encryption. Otherwise, a malicious attack can intercept the credentials as they cross the network.
127+
Use the **Authenticate with Basic** policy to enable authentication in plain text. This form of authentication is broadly supported, but remember that you should protect it with Transport Layer Security (TLS) encryption. Otherwise, a malicious attack can intercept the credentials as they cross the network.
128128

129129
Use the **Authenticate with client certificate** policy to enable clients to authenticate by supplying a client certificate.
130130

@@ -134,7 +134,7 @@ Cross-domain requests are considered a security threat and denied by browsers an
134134

135135
Use the **Allow cross-domain calls** policy to permit calls from Adobe Flash and Silverlight. If your API or client apps rely on Cross-Origin Resource Sharing (CORS), use the **CORS** policy to permit them.
136136

137-
Some AJAX code, which runs on the browser, uses JSON with padding to make cross-domain calls securely. Use the **JSONP** policy to permit clients to use this technique.
137+
Some Asynchronous JavaScript and XML (AJAX) code, which runs on the browser, uses JSON with padding to make cross-domain calls securely. Use the **JSONP** policy to permit clients to use this technique.
138138

139139
### Transformation policies
140140

@@ -144,13 +144,13 @@ To convert to and from JSON and XML, use the **Convert JSON to XML** and **Conve
144144

145145
Sometimes you want to keep a response in XML, but alter its schema. In such cases, use the **Transform XML** policy to apply an XSLT template.
146146

147-
Use **Find and replace string in body** to execute a string substitution. For example, if a brand name changes, you could use this policy to ensure that the change is reflected in all responses, even if the underlying data still includes references to the old name.
147+
Use **Find and replace string in body** to execute a string substitution. For example, if a brand name changes, you could use this policy to ensure that the change is reflected in all responses. Even if the underlying data still includes references to the old name.
148148

149-
The **Mask URLs in content** policy can rewrite any links in the response body so that they point to a different location. This policy is useful when a website or web API has moved.
149+
The **Mask URLs in content** policy can rewrite any links in the response body so that they point to a different location. This policy is useful when a website or web API moves.
150150

151151
Use the **Set body** policy to set the message text for incoming and outgoing requests.
152152

153-
If you want to modify an incoming HTTP request or outgoing response, you can use several different policies. To add items to an existing response or request header, use the **Set HTTP header** policy. If you need to modify the query strings, which appear after the question mark in the URL, use the **Set query string parameter** policy. If a public URL, which a user has requested, must be mapped to a different internal destination, the **Rewrite URL** policy can perform the conversion both inbound and outbound.
153+
If you want to modify an incoming HTTP request or outgoing response, you can use several different policies. To add items to an existing response or request header, use the **Set HTTP header** policy. If you need to modify the query strings, which appear after the question mark in the URL, use the **Set query string parameter** policy. If a user requests a public URL that must be mapped to a different internal destination, the **Rewrite URL** policy can perform the conversion both inbound and outbound.
154154

155155
### Advanced policies
156156

@@ -160,7 +160,7 @@ For example, if you want to apply a policy only when the response passes a speci
160160

161161
Use the **Forward request** policy to forward a request to a backend server.
162162

163-
To control what happens when an action fails, use the **Retry** policy. Policy statements enclosed in **Retry** will execute repeatedly until a condition is met. Execution repeats at the specified time intervals up until the retry count value is reached.
163+
To control what happens when an action fails, use the **Retry** policy. Policy statements that are enclosed in **Retry**, execute repeatedly until a condition is met. Execution repeats at the specified time intervals up until the retry count value is reached.
164164

165165
The **Send one-way request** policy can send a request to a URL without waiting for a response.
166166

learn-pr/azure/improve-api-performance-with-apim-caching-policy/includes/4-configure-a-caching-policy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Optimal API performance is essential to most organizations. By using a cache of
22

33
Suppose there's a need for the board gaming API to provide faster responses to requests. For example, users often request prices for various sizes of the board for games. API Management policies can accelerate responses by configuring a cache of prepared responses. When a request is received from a user, API Management checks to see if there's an appropriate response in the cache already. If there is, that response can be sent to the user without building it again from the data source.
44

5-
Here, you'll learn how to configure such a cache.
5+
Here, you learn how to configure such a cache.
66

77
## How to control the API Management cache
88

9-
To set up a cache, you use an outbound policy named `cache-store` to store responses. You also use an inbound policy named `cache-lookup` to check if there's a cached response for the current request. You can see these two policies in the example below:
9+
To set up a cache, you use an outbound policy named `cache-store` to store responses. You also use an inbound policy named `cache-lookup` to check if there's a cached response for the current request. You can see these two policies in the following example:
1010

1111
```xml
1212
<policies>
@@ -60,7 +60,7 @@ It's important to ensure that, if you serve a response from the cache, it's rele
6060

6161
`http://<boardgames.domain>/stock/api/product?partnumber=3416&customerid=1128`
6262

63-
This request is intended to check the stock levels for a product with part number 3416. The customer ID is used by a separate policy, and doesn't alter the response. Subsequent requests for the same part number can be served from the cache, as long as the record hasn't expired. So far, so good.
63+
This request is intended to check the stock levels for a product with part number 3416. The customer ID is used by a separate policy, and doesn't alter the response. Subsequent requests for the same part number can be served from the cache, as long as the record doesn't expire. So far, so good.
6464

6565
Now suppose that a different customer requests the same product:
6666

@@ -93,7 +93,7 @@ To modify this default behavior, use the `vary-by-query-parameter` element withi
9393
</policies>
9494
```
9595

96-
With this policy, the cache will store and separate responses for each product, because they have different part numbers. The cache won't store separate responses for each *customer*, because that query parameter isn't listed.
96+
With this policy, the cache stores and separates responses for each product, because they have different part numbers. The cache doesn't store separate responses for each *customer*, because that query parameter isn't listed.
9797

9898
By default, Azure API Management doesn't examine HTTP headers to determine whether a cached response is suitable for a given request. If a header can make a significant difference to a response, use the `<vary-by-header>` tag. Work with your developer team to understand how each API uses query parameters and headers so you can decide which vary-by tags to use in your policy.
9999

0 commit comments

Comments
 (0)