在APIM中无效/删除缓存 [英] Invalidate/Remove Cache in APIM

查看:93
本文介绍了在APIM中无效/删除缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team, 


当我们使用Store-Cache时,缓存密钥由APIM自动生成并提供给我们以进行< cache-looking-up>。我们有功能要求在需要时使Cache无效。 


是否有任何原因使用此APIM生成的CacheKey使此缓存无效


PS:我们不想使用自定义/片段缓存它有性能问题和维护代码所需的额外工作。

解决方案

是的,你可以do 


< cache-remove-value
key = " cache
key value"

缓存类型 = " prefer-external
| external | internal"
/>


参考:
https://docs.microsoft.com/en-us/azure/api-management/api-management-caching-policies







Hi Team, 

When we use Store-Cache the cache key is auto generated by APIM and provided to us for <cache-look-up>. We have functional Requirement to invalidate Cache when needed. 

Is there any why to invalidate this cache with this APIM generated CacheKey

P.S: we don't want to use custom/fragment caching it has performance issues and additional efforts needed to maintain code.

解决方案

Yes, You can do 

<cache-remove-value key="cache key value" caching-type="prefer-external | external | internal" />

Refer: https://docs.microsoft.com/en-us/azure/api-management/api-management-caching-policies



这篇关于在APIM中无效/删除缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆