You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/06 02:17:45 UTC

[GitHub] [apisix] zou8944 opened a new pull request, #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

zou8944 opened a new pull request, #8252:
URL: https://github.com/apache/apisix/pull/8252

   ### Description
   
   In official website, the `cache-api-responses` in language zh is dazzle, so here I am, contributing this page.
   
   <img width="330" alt="image" src="https://user-images.githubusercontent.com/18495995/200150896-30039d79-50ec-41ba-a505-ac0a1105997e.png">
   
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have updated the documentation to reflect this change
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #8252:
URL: https://github.com/apache/apisix/pull/8252#discussion_r1014789209


##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+
+**本文概览:**
+
+-  API 网关中如何进行缓存
+-  [APISIX](https://apisix.apache.org/docs/apisix/getting-started/) 如何支持 API 网关缓存
+- 运行示例项目 [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker)
+- 配置 [Proxy Cache](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/) 插件
+- 验证缓存效果
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API ,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API可用性降低,甚至会时不时发生网络故障。
+
+##  API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存( API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果API网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+##  APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在Github上获取完整源码,并了解如何用Docker命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用sevice层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+> 注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。

Review Comment:
   ```suggestion
   :::note 注意
   一般来说,除特殊情况外,`GET`请求应默认开启缓存。
   :::
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应

Review Comment:
   ```suggestion
   title: 缓存 API
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+
+**本文概览:**
+
+-  API 网关中如何进行缓存
+-  [APISIX](https://apisix.apache.org/docs/apisix/getting-started/) 如何支持 API 网关缓存
+- 运行示例项目 [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker)
+- 配置 [Proxy Cache](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/) 插件
+- 验证缓存效果
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API ,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API可用性降低,甚至会时不时发生网络故障。
+
+##  API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存( API 缓存)

Review Comment:
   ```suggestion
   - 服务端缓存(API 缓存)
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+
+**本文概览:**
+
+-  API 网关中如何进行缓存
+-  [APISIX](https://apisix.apache.org/docs/apisix/getting-started/) 如何支持 API 网关缓存
+- 运行示例项目 [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker)
+- 配置 [Proxy Cache](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/) 插件
+- 验证缓存效果

Review Comment:
   ```suggestion
   ##描述
   本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应

Review Comment:
   ```suggestion
   title: API 缓存
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。

Review Comment:
   ```suggestion
   description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache ` 插件为你的 Web 应用或微服务 API 提升响应效率。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+
+**本文概览:**
+
+-  API 网关中如何进行缓存
+-  [APISIX](https://apisix.apache.org/docs/apisix/getting-started/) 如何支持 API 网关缓存
+- 运行示例项目 [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker)
+- 配置 [Proxy Cache](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/) 插件
+- 验证缓存效果
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API ,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API可用性降低,甚至会时不时发生网络故障。
+
+##  API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存( API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果API网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+##  APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在Github上获取完整源码,并了解如何用Docker命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用sevice层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+> 注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size`等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 `route` ,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+如上,配置完成,我们的配置中,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS` 。再次访问时,将会得到一个已缓存的响应, `Apisix-Cache-Status` 的值将会是 `HIT` 。
+
+现在我们发送第一个请求:
+
+``` shell
+curl http://localhost:9080/api/products -i
+```
+
+响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: MISS
+```
+
+再次访问时,由于前一个请求的响应已被缓存,所以这次访问将命中缓存,响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: HIT
+```
+
+如果我们在缓存存活时间( `time-to-live` ,简称 `TTL` )之后访问,将会得到如下响应:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: EXPIRED
+```
+
+至此,我们成功地为 API 开启了缓存。
+
+### 进一步测试
+
+我们也可以在 Product Controller 代码中手动添加延迟,用以对比有缓存和没有缓存时的响应时间:
+
+``` c#
+ [HttpGet]
+ public IActionResult GetAll()
+ {
+ Console.Write("The delay starts.\n");
+ System.Threading.Thread.Sleep(5000);
+ Console.Write("The delay ends.");
+ return Ok(_productsService.GetAll());
+ }
+```
+
+测量响应耗时的 `curl` 命令如下:
+
+```shell
+curl -i 'http://localhost:9080/api/products' -s -o /dev/null -w "Response time: %{time_starttransfer} seconds\n"
+```
+
+## What's next

Review Comment:
   need translation



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+本文主要关注如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用`proxy-cache`插件为您的 Web 应用或微服务 API 提升响应效率。
+
+**本文概览:**
+
+-  API 网关中如何进行缓存
+-  [APISIX](https://apisix.apache.org/docs/apisix/getting-started/) 如何支持 API 网关缓存
+- 运行示例项目 [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker)
+- 配置 [Proxy Cache](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/) 插件
+- 验证缓存效果
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API ,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API可用性降低,甚至会时不时发生网络故障。
+
+##  API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存( API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果API网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+##  APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在Github上获取完整源码,并了解如何用Docker命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用sevice层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+> 注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size`等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 `route` ,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+如上,配置完成,我们的配置中,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS` 。再次访问时,将会得到一个已缓存的响应, `Apisix-Cache-Status` 的值将会是 `HIT` 。
+
+现在我们发送第一个请求:
+
+``` shell
+curl http://localhost:9080/api/products -i
+```
+
+响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: MISS
+```
+
+再次访问时,由于前一个请求的响应已被缓存,所以这次访问将命中缓存,响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: HIT
+```
+
+如果我们在缓存存活时间( `time-to-live` ,简称 `TTL` )之后访问,将会得到如下响应:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: EXPIRED
+```
+
+至此,我们成功地为 API 开启了缓存。
+
+### 进一步测试
+
+我们也可以在 Product Controller 代码中手动添加延迟,用以对比有缓存和没有缓存时的响应时间:
+
+``` c#
+ [HttpGet]
+ public IActionResult GetAll()
+ {
+ Console.Write("The delay starts.\n");
+ System.Threading.Thread.Sleep(5000);
+ Console.Write("The delay ends.");
+ return Ok(_productsService.GetAll());
+ }
+```
+
+测量响应耗时的 `curl` 命令如下:
+
+```shell
+curl -i 'http://localhost:9080/api/products' -s -o /dev/null -w "Response time: %{time_starttransfer} seconds\n"
+```
+
+## What's next
+
+通过本文,我们了解到,有了 APISIX 的赋能,为示例项目设置 API 响应缓存将会非常简单。它能显著减少对后端服务的访问次数,降低 API 访问延迟。此外, APISIX 中还有很多其它内建的插件可用,具体请参考[插件中心](https://apisix.apache.org/plugins/),根据需要取用。
+
+## Recommended content

Review Comment:
   need translation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #8252:
URL: https://github.com/apache/apisix/pull/8252#discussion_r1017637392


##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。

Review Comment:
   ```suggestion
   了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #8252:
URL: https://github.com/apache/apisix/pull/8252#discussion_r1017513323


##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+

Review Comment:
   ```suggestion
   
   针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] zou8944 commented on a diff in pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
zou8944 commented on code in PR #8252:
URL: https://github.com/apache/apisix/pull/8252#discussion_r1014983321


##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: 缓存 API 响应

Review Comment:
   API 缓存 or  缓存 API ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] zou8944 closed pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
zou8944 closed pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials
URL: https://github.com/apache/apisix/pull/8252


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
hf400159 commented on PR #8252:
URL: https://github.com/apache/apisix/pull/8252#issuecomment-1321546048

   Sorry, for the documentation of APISIX, we should keep the content of the documentation concise and standardized. Could you submit this PR first; what do you think? Thanks for your contribution~ @zou8944 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #8252:
URL: https://github.com/apache/apisix/pull/8252#discussion_r1026201807


##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。

Review Comment:
   ```suggestion
   首先通过 [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) 仓库,运行示例项目。你可以在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。

Review Comment:
   ```suggestion
   该项目暴露了一个简单的 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT

Review Comment:
   ```suggestion
   curl http://127.0.0.1:9180/apisix/admin/plugins/reload \
   -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。

Review Comment:
   ```suggestion
   接下来,你可以通过以下命令创建一个 URI 为 `/api/products` 的上游:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{

Review Comment:
   ```suggestion
   curl "http://127.0.0.1:9180/apisix/admin/routes/1" \
   -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
   {
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+配置完成后,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching

Review Comment:
   ```suggestion
   ## 验证
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:

Review Comment:
   ```suggestion
    `proxy-cache` 插件默认为启用状态,你也可以在配置文件 `./conf/config.yaml` 中启用该插件,示例如下:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+配置完成后,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS`。再次访问时,将会得到一个已缓存的响应,`Apisix-Cache-Status` 的值将会是 `HIT`。
+
+现在我们发送第一个请求:
+
+``` shell
+curl http://localhost:9080/api/products -i
+```
+
+响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: MISS
+```
+
+再次访问时,由于前一个请求的响应已被缓存,所以这次访问将命中缓存,响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: HIT
+```
+
+如果我们在缓存存活时间(`time-to-live` ,简称 `TTL`)之后访问,将会得到如下响应:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: EXPIRED
+```
+
+至此,我们成功地为 API 开启了缓存。
+
+### 进一步测试
+
+我们也可以在 Product Controller 代码中手动添加延迟,用以对比有缓存和没有缓存时的响应时间:
+
+``` c#
+ [HttpGet]
+ public IActionResult GetAll()
+ {
+ Console.Write("The delay starts.\n");
+ System.Threading.Thread.Sleep(5000);
+ Console.Write("The delay ends.");
+ return Ok(_productsService.GetAll());
+ }
+```
+
+测量响应耗时的 `curl` 命令如下:
+
+```shell
+curl -i 'http://localhost:9080/api/products' -s -o /dev/null -w "Response time: %{time_starttransfer} seconds\n"
+```
+
+## 下一步
+
+通过本文,我们了解到,有了 APISIX 的赋能,为示例项目设置 API 响应缓存将会非常简单。它能显著减少对后端服务的访问次数,降低 API 访问延迟。此外,APISIX 中还有很多其它内建的插件可用,具体请参考[插件中心](https://apisix.apache.org/plugins/),根据需要取用。

Review Comment:
   ```suggestion
   通过本教程,相信你已经了解了如何为项目设置 API 响应缓存。设置缓存后,可以显著地减少请求对后端服务的访问次数,降低 API 访问延迟。此外,APISIX 还支持了很多插件,你可以访问[插件中心](https://apisix.apache.org/plugins/)查找自己需要的插件。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache

Review Comment:
   ```suggestion
   ``` yaml
   proxy_cache:                       # 代理缓存配置
       cache_ttl: 10s                 # 如果上游未指定缓存时间,则为默认缓存时间
       zones:                         # 缓存的参数
       - name: disk_cache_one         # 缓存名称(缓存区域),管理员可以通过 admin api 中的 cache_zone 字段指定要使用的缓存区域
         memory_size: 50m             # 共享内存的大小,用于存储缓存索引
         disk_size: 1G                # 磁盘大小,用于存储缓存数据
         disk_path: "/tmp/disk_cache_one" # 存储缓存数据的路径
         cache_levels: "1:2"          # 缓存的层次结构级别
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:

Review Comment:
   ```suggestion
   你也可以在该配置文件中添加缓存的配置信息,例如 `disk_size`、`memory_size` 等,示例如下:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:

Review Comment:
   ```suggestion
   通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing)) APISIX 可以将请求的响应存储到内存或者磁盘中,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:

Review Comment:
   ```suggestion
   之后,你可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。

Review Comment:
   ```suggestion
   最后,你可以创建一个路由配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+配置完成后,仅会缓存 `GET` 请求成功后的响应。

Review Comment:
   ```suggestion
   配置完成后,仅会缓存 `GET` 请求成功后的响应信息。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+配置完成后,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS`。再次访问时,将会得到一个已缓存的响应,`Apisix-Cache-Status` 的值将会是 `HIT`。

Review Comment:
   ```suggestion
   你可以向 `/api/products` 发送多个请求,验证缓存是否正常工作。正常情况下,每次都应该能得到 `HTTP 200 OK` 的响应。
   
   第一次访问时,由于响应信息尚未被网关缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS`。再次访问时,将会得到一个已缓存的响应,`Apisix-Cache-Status` 的值将会是 `HIT`。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+配置完成后,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS`。再次访问时,将会得到一个已缓存的响应,`Apisix-Cache-Status` 的值将会是 `HIT`。
+
+现在我们发送第一个请求:
+
+``` shell
+curl http://localhost:9080/api/products -i
+```
+
+响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: MISS
+```
+
+再次访问时,由于前一个请求的响应已被缓存,所以这次访问将命中缓存,响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: HIT
+```
+
+如果我们在缓存存活时间(`time-to-live` ,简称 `TTL`)之后访问,将会得到如下响应:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: EXPIRED
+```
+
+至此,我们成功地为 API 开启了缓存。

Review Comment:
   ```suggestion
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '

Review Comment:
   ```suggestion
   curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" \
   -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+配置完成后,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS`。再次访问时,将会得到一个已缓存的响应,`Apisix-Cache-Status` 的值将会是 `HIT`。
+
+现在我们发送第一个请求:
+
+``` shell
+curl http://localhost:9080/api/products -i
+```
+
+响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: MISS
+```
+
+再次访问时,由于前一个请求的响应已被缓存,所以这次访问将命中缓存,响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: HIT
+```
+
+如果我们在缓存存活时间(`time-to-live` ,简称 `TTL`)之后访问,将会得到如下响应:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: EXPIRED
+```
+
+至此,我们成功地为 API 开启了缓存。
+
+### 进一步测试
+
+我们也可以在 Product Controller 代码中手动添加延迟,用以对比有缓存和没有缓存时的响应时间:

Review Comment:
   ```suggestion
   你也可以在 Product Controller 代码中手动添加延迟,用以对比有缓存和没有缓存时的响应时间:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+
+除特殊情况外,`GET` 请求应默认开启缓存。
+
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+配置完成后,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS`。再次访问时,将会得到一个已缓存的响应,`Apisix-Cache-Status` 的值将会是 `HIT`。
+
+现在我们发送第一个请求:
+
+``` shell
+curl http://localhost:9080/api/products -i
+```
+
+响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: MISS
+```
+
+再次访问时,由于前一个请求的响应已被缓存,所以这次访问将命中缓存,响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: HIT
+```
+
+如果我们在缓存存活时间(`time-to-live` ,简称 `TTL`)之后访问,将会得到如下响应:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: EXPIRED
+```
+
+至此,我们成功地为 API 开启了缓存。
+
+### 进一步测试
+
+我们也可以在 Product Controller 代码中手动添加延迟,用以对比有缓存和没有缓存时的响应时间:
+
+``` c#
+ [HttpGet]
+ public IActionResult GetAll()
+ {
+ Console.Write("The delay starts.\n");
+ System.Threading.Thread.Sleep(5000);
+ Console.Write("The delay ends.");
+ return Ok(_productsService.GetAll());
+ }
+```
+
+测量响应耗时的 `curl` 命令如下:

Review Comment:
   ```suggestion
   你可以通过以下命令测试响应耗时:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,223 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
+
+## API 网关缓存
+
+通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。

Review Comment:
   ```suggestion
   假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,你可以通过 `proxy-cache` 插件来实现 API 响应信息缓存,降低服务延迟,减轻后端服务压力。本示例中,仅为 `GET` 请求开启缓存。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] zou8944 commented on pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
zou8944 commented on PR #8252:
URL: https://github.com/apache/apisix/pull/8252#issuecomment-1321533039

   Hello, @hf400159, you updated almost all my translations, I don't think you need my contribution. 
   If you point out my format is not correct and some fine-tuning about content, I think it's good suggestion. 
   But according to current situation, it seems that you want follow your own idea completely.
   So if needed, I suggest you close this pull request directly.
   
   Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] zou8944 commented on pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
zou8944 commented on PR #8252:
URL: https://github.com/apache/apisix/pull/8252#issuecomment-1305034369

   > LGTM! Can you modify the format? please refer to: https://apisix.apache.org/zh/docs/general/documentation-style-guide/
   > 
   > Perhaps you can also modify the sentence in the document.
   
   OK
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #8252: docs: add cache-api-responses.md in docs/zh/latest/tutorials

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #8252:
URL: https://github.com/apache/apisix/pull/8252#discussion_r1017513323


##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+

Review Comment:
   ```suggestion
   
   针对以上问题,APISIX 支持配置缓存,来增加服务响应速度。
   
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:

Review Comment:
   ```suggestion
   通过[缓存](https://en.wikipedia.org/wiki/Cache_(computing))可以将请求的响应存储下来,当请求再次到来时,可以直接使用缓存中的数据。在 Web 应用架构的不同层级中,缓存均有应用,比如:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。

Review Comment:
   ```suggestion
   本教程则介绍另外一种缓存机制——**反向代理缓存**。该缓存机制通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+:::
+

Review Comment:
   ```suggestion
   :::note 注意
   
   除特殊情况外,`GET` 请求应默认开启缓存。
   
   :::
   
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。

Review Comment:
   ```suggestion
   首先将该示例项目([apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker))运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size`等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 `route` ,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。

Review Comment:
   ```suggestion
   最后,添加新的 Route,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size`等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 `route` ,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+如上,配置完成,我们的配置中,仅会缓存 `GET` 请求成功后的响应。

Review Comment:
   ```suggestion
   配置完成后,仅会缓存 `GET` 请求成功后的响应。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size`等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 `route` ,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+如上,配置完成,我们的配置中,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS` 。再次访问时,将会得到一个已缓存的响应, `Apisix-Cache-Status` 的值将会是 `HIT` 。
+
+现在我们发送第一个请求:
+
+``` shell
+curl http://localhost:9080/api/products -i
+```
+
+响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: MISS
+```
+
+再次访问时,由于前一个请求的响应已被缓存,所以这次访问将命中缓存,响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: HIT
+```
+
+如果我们在缓存存活时间( `time-to-live` ,简称 `TTL` )之后访问,将会得到如下响应:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: EXPIRED
+```
+
+至此,我们成功地为 API 开启了缓存。
+
+### 进一步测试
+
+我们也可以在 Product Controller 代码中手动添加延迟,用以对比有缓存和没有缓存时的响应时间:
+
+``` c#
+ [HttpGet]
+ public IActionResult GetAll()
+ {
+ Console.Write("The delay starts.\n");
+ System.Threading.Thread.Sleep(5000);
+ Console.Write("The delay ends.");
+ return Ok(_productsService.GetAll());
+ }
+```
+
+测量响应耗时的 `curl` 命令如下:
+
+```shell
+curl -i 'http://localhost:9080/api/products' -s -o /dev/null -w "Response time: %{time_starttransfer} seconds\n"
+```
+
+## 下一步
+
+通过本文,我们了解到,有了 APISIX 的赋能,为示例项目设置 API 响应缓存将会非常简单。它能显著减少对后端服务的访问次数,降低 API 访问延迟。此外,APISIX 中还有很多其它内建的插件可用,具体请参考[插件中心](https://apisix.apache.org/plugins/),根据需要取用。
+
+## 推荐内容
+
+你可参考[发布 API](https://apisix.apache.org/zh/docs/apisix/tutorials/expose-api/)了解如何发布你的第一个 API。
+
+也可参考[保护 API](https://apisix.apache.org/zh/docs/apisix/tutorials/protect-api/)了解如何保护你的 API。

Review Comment:
   ```suggestion
   你可参考[发布 API](https://apisix.apache.org/zh/docs/apisix/tutorials/expose-api/) 了解如何发布你的第一个 API。
   
   也可参考[保护 API](https://apisix.apache.org/zh/docs/apisix/tutorials/protect-api/) 了解如何保护你的 API。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。

Review Comment:
   ```suggestion
   工作原理:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求;否则,请求将会被转发到对应的后端服务。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size`等,如下:

Review Comment:
   ```suggestion
   用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size` 等,如下:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。

Review Comment:
   ```suggestion
   在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能,当前仅支持基于磁盘和内存的缓存。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:

Review Comment:
   ```suggestion
   在一般情况下,我们希望可以构建简单快速的服务,但随着请求的并发数增加,以下问题日益凸显:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。

Review Comment:
   ```suggestion
   假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时,`proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。

Review Comment:
   ```suggestion
   缓存的数据能够通过响应码(如 `200`、`201`)、请求方法(如 `GET`、`HEAD`)等进行过滤,也能通过 `no_cache`、`cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。详细信息,请参考[插件属性](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/)。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:

Review Comment:
   ```suggestion
   由于在当前项目中,我们尚未在 APISIX 中注册 `proxy-cache` 插件,所以首先需要注册,方法是将其添加在配置文件 `./conf/config.yaml` 的插件列表末尾:
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size`等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 `route` ,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+如上,配置完成,我们的配置中,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS` 。再次访问时,将会得到一个已缓存的响应, `Apisix-Cache-Status` 的值将会是 `HIT` 。

Review Comment:
   ```suggestion
   为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS`。再次访问时,将会得到一个已缓存的响应,`Apisix-Cache-Status` 的值将会是 `HIT`。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。

Review Comment:
   ```suggestion
   此项目暴露了一个简单 API — 在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 service 层获取产品列表。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。

Review Comment:
   ```suggestion
   了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
   ```



##########
docs/zh/latest/tutorials/cache-api-responses.md:
##########
@@ -0,0 +1,219 @@
+---
+title: API 缓存
+keywords:
+  - API 网关
+  - Apache APISIX
+  - 缓存
+  - 性能
+description: 本文主要介绍了如何使用 APISIX 处理网关级别的缓存。通过本教程,用户能够了解如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+本文介绍了如何使用 APISIX 来处理网关级别的缓存。通过本教程,你可以了解到如何使用 `proxy-cache` 插件为你的 Web 应用或微服务 API 提升响应效率。
+
+## 通过缓存提升性能
+
+我们总是希望构建简单快速的 API,但随着 API 请求的并发数增加,如下问题日益凸显,此时考虑使用缓存:
+
+- 请求延时增加,影响用户体验。
+- 高并发传递到数据库,使得数据库查询时间明显增加。
+- API 可用性降低,甚至会时不时发生网络故障。
+
+## API 网关缓存
+
+[缓存](https://en.wikipedia.org/wiki/Cache_(computing))能够将请求的响应存储下来,在下次请求到来时直接使用。在 Web 应用架构的不同层级中,缓存均有应用,比如:
+
+- 浏览器缓存
+- 边缘缓存或 CDN
+- 服务端缓存(API 缓存)
+- 数据库缓存
+
+本文讨论另一种缓存机制——**反向代理缓存**,通常在 API 网关中实现,通过在网关中缓存后端服务的响应,以达到减少对后端服务的访问次数,降低请求延迟的目的。
+
+其基本工作原理为:如果 API 网关已经缓存了请求资源的最新副本,则直接用该副本响应请求,不会再请求后端服务;否则,请求将会被转发到对应的后端服务。
+
+## APISIX 网关缓存
+
+在 APISIX 中,用户可通过 `proxy-cache` 插件开启缓存功能。当前支持基于磁盘和内存的缓存。
+
+缓存的数据能够通过响应码(如 `200` 、 `201` )、请求方法(如 `GET` 、 `HEAD` )等进行过滤,也能通过 `no_cache` 、 `cache_bypass` 等属性配置更复杂的过滤。此外,还可指定缓存过期时间、内存容量等。具体参见[插件属性](https:// APISIX .apache.org/docs/ APISIX /plugins/proxy-cache/)。
+
+了解了基本工作原理,下面我们来看一个由 APISIX 团队提供的使用 `proxy-cache` 插件的示例,该示例展现了一个具有单个端点的 ASP.NET 项目。
+
+## 运行示例项目
+
+首先将该示例项目( [apisix-dotnet-docker](https://github.com/Boburmirzo/apisix-dotnet-docker) )运行起来。用户可在 Github 上获取完整源码,并了解如何用 Docker 命令行工具构建镜它。
+
+此项目暴露了一个简单 API ——在 [ProductsControllers.cs](https://github.com/Boburmirzo/apisix-dotnet-docker/blob/main/ProductApi/Controllers/ProductsController.cs) 中调用 sevice 层获取产品列表。
+
+假设该产品列表每天仅更新一次,而后端服务每天会接收数以亿计获取该列表的请求。此时, `proxy-cache` 插件就有了用武之地。作为演示,我们仅为 `GET` 请求开启缓存。
+
+:::note 注意
+注意:一般来说,除特殊情况外,`GET`请求应默认开启缓存。
+:::
+
+## 配置缓存插件
+
+由于在当前项目中,我们尚未在 APISIX 中注册`proxy-cache`插件,所以首先需要注册,方法是将其添加在配置文件 `config.yaml` 的插件列表末尾:
+
+``` yaml
+plugins:
+ - http-logger
+ - ip-restriction
+ ...
+ - proxy-cache
+```
+
+用户也可以在该配置文件中添加缓存的配置信息,如 `disk_size`、`memory_size`等,如下:
+
+``` yaml
+proxy_cache:
+ cache_ttl: 10s # default caching time if the upstream doesn't specify the caching time
+ zones:
+ - name: disk_cache_one # name of the cache. Admin can specify which cache to use in the Admin API by name
+ memory_size: 50m # size of shared memory, used to store the cache index
+ disk_size: 1G # size of disk, used to store the cache data
+ disk_path: "/tmp/disk_cache_one" # path to store the cache data
+ cache_levels: "1:2" # hierarchy levels of the cache
+```
+
+然后,我们可以直接运行 `reload` 命令在不重启 APISIX 的情况下加载最新配置,具体如下:
+
+``` shell
+curl http://127.0.0.1:9180/apisix/admin/plugins/reload -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT
+```
+
+接着,运行如下命令创建一个指向 `/api/products` 所在服务的 `upstream` 资源。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
+{
+  "type": "roundrobin",
+  "nodes": {
+    "productapi:80": 1
+  }
+}'
+```
+
+最后,添加新的 `route` ,配置 `proxy-cache` 插件开启缓存能力,并通过 `upstream_id` 引用上一步创建的上游服务。
+
+``` shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '{
+  "name": "Route for API Caching",
+  "methods": [
+    "GET"
+  ],
+  "uri": "/api/products",
+  "plugins": {
+    "proxy-cache": {
+      "cache_key": [
+        "$uri",
+        "-cache-id"
+      ],
+      "cache_bypass": [
+        "$arg_bypass"
+      ],
+      "cache_method": [
+        "GET"
+      ],
+      "cache_http_status": [
+        200
+      ],
+      "hide_cache_headers": true,
+      "no_cache": [
+        "$arg_test"
+      ]
+    }
+  },
+  "upstream_id": 1
+}'
+```
+
+如上,配置完成,我们的配置中,仅会缓存 `GET` 请求成功后的响应。
+
+## Validate Proxy Caching
+
+为了验证缓存是否正常工作,我们可以向 `/api/products` 发送多个请求,每次都应该能得到 `HTTP 200 OK` 的响应。首次访问时,由于响应尚未被缓存,响应头 `Apisix-Cache-Status` 的值将会 `MISS` 。再次访问时,将会得到一个已缓存的响应, `Apisix-Cache-Status` 的值将会是 `HIT` 。
+
+现在我们发送第一个请求:
+
+``` shell
+curl http://localhost:9080/api/products -i
+```
+
+响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: MISS
+```
+
+再次访问时,由于前一个请求的响应已被缓存,所以这次访问将命中缓存,响应如下:
+
+``` shell
+HTTP/1.1 200 OK
+…
+Apisix-Cache-Status: HIT
+```
+
+如果我们在缓存存活时间( `time-to-live` ,简称 `TTL` )之后访问,将会得到如下响应:

Review Comment:
   ```suggestion
   如果我们在缓存存活时间(`time-to-live` ,简称 `TTL`)之后访问,将会得到如下响应:
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org