Cache Eviction not Reflected in Monitoring

0

I've set up the following response mapping template to initiate cache eviction on a certain dynamic cache key. It seemingly works after some testing, but is not reflected in monitoring, making me think that I've wrote the template incorrectly. If anyone can help verify the template or direct me that would be great, I am quite lost.

$util.qr($ctx.result.put("__operation", "Mutation"))
#if( $ctx.error )
  $util.error($ctx.error.message, $ctx.error.type)
#else
  #set($cachingKeys = {})
  $util.qr($cachingKeys.put("context.arguments.school", $ctx.args.input.school))
  $extensions.evictFromApiCache("Query", "announcementsBySchool", $cachingKeys)

  $util.toJson($ctx.result)
#end

Absent cache evictions

Adrian
已提問 9 個月前檢視次數 104 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南