We've 3 environments (prod, test and sandbox) in Apigee and each environment supports multiple target endpoints. The target endpoints conditions are defined in default post flow RouteRules. E.g.
<RouteRule name="xyz"> <Condition>request.header.host = "abc.com"</Condition> <TargetEndpoint>XYZ</TargetEndpoint> </RouteRule>
Now, to add response cache for multiple target endpoints, I added the caches for different endpoints in the default preflow (following Apigee tutorial doc) -
<PreFlow> <Request> <Step> <Name>Verify-API-Key-1</Name> </Step> <Step> <Name>Remove-Query-Param</Name> </Step> <Step> <Name>cache_x</Name> </Step> <Step> <Name>cache_y</Name> </Step> <Step> <Name>cache_z</Name> </Step> </Request> <Response/> </PreFlow>
But, this is not working as intended. Tracing api calls shows that apis with different target endpoints are not fetching from the right cache always.
Any suggestion on adding multiple cache policies in a single proxy that's been deployed in multiple environments and have different target endpoints?
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |