lookupcache.LookupCachePolicy.cachehit 在请求中显示 true 或 false

lookupcache.LookupCachePolicy.cachehit shows either true or false across request

所以我有一个 API 端点,它创建一个缓存并验证该缓存是否存在。然而,Lookup Cache 策略在对相同负载的重复请求中显示不同的响应。它会在多个请求中显示 true 或 false。为什么会这样?

Flow 变量 lookupcache.LookupCachePolicy.cachekey 和 lookupcache.LookupCachePolicy.cachename 在所有此请求中都是相同的,但缓存命中值仍然是 true 或 false,即使该值存在于缓存中。

我的解决方案是删除

<PurgeChildEntries>true</PurgeChildEntries> 

在我的无效缓存策略中,由于某种原因,它随机地使未在 属性 的引用中输入的缓存无效。因此在查找缓存策略中收到间歇性响应。

See this link for further details