Response Policy cachekey expires when updated externally

When a Response Policy cache key is updated externally for instance node.js code it triggers the Response cache policy to invalidate its cache entry instead of just refreshing it.

For instance: ResponsePolicy is used to set the below key value with the expiring as 600 seconds:

Key : Value

10 : "Hello World"

Every 30 second Node code updates it value:

Key : Value

10 : "Refresh Cache New Value"

Expected behavior next time response cache is looked up it should get the new value set i.e "Refresh Cache New Value", however I noticed that whenever the cache is updated using node, the Response cache ket gets expired immediately forcing a backend call.

Any suggestion on how to asynchronously update the cachekey without forcing a back-end call?

Solved Solved
1 1 148
1 ACCEPTED SOLUTION

After discussing with @Greg Brail we believe that the namespace used by Response cache policy is different from LookupCache or cache resource access from Node.js so unfortunately there isn't a way today to access the Response Cache name space from Node.js code. Hopefully this is a new enhancement we can add soon? @Greg Brail

View solution in original post

1 REPLY 1

After discussing with @Greg Brail we believe that the namespace used by Response cache policy is different from LookupCache or cache resource access from Node.js so unfortunately there isn't a way today to access the Response Cache name space from Node.js code. Hopefully this is a new enhancement we can add soon? @Greg Brail