Response Cache Policy in Flow Hook

Not applicable

Hello,

I'm trying to enable use of response cache headers for all of our services by default. So logical assumption was to add Response Cache to pre- & post-proxy flow hook. However, I'm not having success with this, all calls are resulting in CACHE MISS even though the resource and keys are identical.

Any idea why this may be the case?

Is Response Cache not supported in flow hooks? If so, why not?

Thank you,

Travis M.

1 2 403
2 REPLIES 2

Not applicable

Hi Travis, Good question.

"The ResponseCache policy type is unique in that it must be attached to both the request and response flow in an API proxy (PreFlow, Flow, or PostFlow). "

http://docs.apigee.com/api-services/reference/response-cache-policy

So having response cache in a Shared flow is not possible.

However you could try exploring LookupCache and Populate Cache policies in Shared flows?

Please let us know if you need further support.

Thanks

Prakash

Yes! You could use the "primitive" Lookup and Populate operations within a pair of sharedflows (attached to flowhooks) to accomplish what you want.