我可以将 Azure APIM 配置为遵守 Cache-Control headers 吗?
Can I configure Azure APIM to respect Cache-Control headers?
我想向我们通过 APIM 公开的应用程序添加缓存。我的首选方法是将 cache-control headers 添加到客户端的响应中。我可以将 Azure APIM 配置为遵守作为基础服务响应一部分的 Cache-Control headers 吗?我能找到的所有文档都是如何在 APIM 中配置所有缓存策略和规则,我只想要一个简单的规则,上面写着“尊重来自底层服务的 headers”。
没有专门针对此的内置策略,但您可以使用可用的策略自行设计此类机制。这是 example how to control API Management response cache duration with Cache-Control headers sent by the backend service.
通过查看上面的示例,您可以尝试处理其他指令。
我想向我们通过 APIM 公开的应用程序添加缓存。我的首选方法是将 cache-control headers 添加到客户端的响应中。我可以将 Azure APIM 配置为遵守作为基础服务响应一部分的 Cache-Control headers 吗?我能找到的所有文档都是如何在 APIM 中配置所有缓存策略和规则,我只想要一个简单的规则,上面写着“尊重来自底层服务的 headers”。
没有专门针对此的内置策略,但您可以使用可用的策略自行设计此类机制。这是 example how to control API Management response cache duration with Cache-Control headers sent by the backend service. 通过查看上面的示例,您可以尝试处理其他指令。