APIM缓存不使用相同的不同参数
我正在研究APIM缓存和测试时。我发现缓存不起作用。如果下面的标题或查询参数(UserauthorizationToken,ProductCode,Pageno,limit)保持不变,则应返回缓存响应。
我正在使用Postman来调用“ GetProduct”传递参数来测试端点。然后,我在数据库中输入更多记录,然后再次致电GetProduct,它返回更多记录。但是,缓存持续时间未达到。
任何建议。
<policies>
<inbound>
<base />
<cache-lookup vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none" must-revalidate="true" allow-private-response-caching="true" caching-type="internal" >
<vary-by-header>userAuthorizationToken</vary-by-header>
<vary-by-query-parameter>productCode</vary-by-query-parameter>
<vary-by-query-parameter>pageNo</vary-by-query-parameter>
<vary-by-query-parameter>limit</vary-by-query-parameter>
</cache-lookup>
</inbound>
<backend>
<base/>
</backend>
<outbound>
<cache-store duration="2400" />
<base/>
</outbound>
<on-error> ....etc
不幸的是,我无法在Azure Portal中访问APIM。
I am working on APIM caching and while testing. I found caching not working. If below header or query parameters (userAuthorizationToken,ProductCode, PageNo, Limit) remain same it should return cache response.
I am using postman to test the endpoint by calling "GetProduct" passing parameters. then I enter more records in database and call the Getproduct again it return more records. However, caching duration not met.
Any advice.
<policies>
<inbound>
<base />
<cache-lookup vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none" must-revalidate="true" allow-private-response-caching="true" caching-type="internal" >
<vary-by-header>userAuthorizationToken</vary-by-header>
<vary-by-query-parameter>productCode</vary-by-query-parameter>
<vary-by-query-parameter>pageNo</vary-by-query-parameter>
<vary-by-query-parameter>limit</vary-by-query-parameter>
</cache-lookup>
</inbound>
<backend>
<base/>
</backend>
<outbound>
<cache-store duration="2400" />
<base/>
</outbound>
<on-error> ....etc
Unfortunately, I can't access APIM in azure portal.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论