Azure API Management - Policies Not Applying Correctly on Nested APIs
I'm integrating two systems and I need some guidance on I'm currently working with Azure API Management (APIM) to manage several backend APIs, including nested APIs that call other APIs... I have added policies for caching in my API Management instance, but I notice that the caching policy is not being applied as expected on my nested APIs. For example, I set the following caching policy at the product level: ```xml <policies> <inbound> <base /> <cache-lookup vary-by-developer="false" vary-by-developer-groups="false" vary-by-developer-groups="false" /> </inbound> <backend> <base /> </backend> <outbound> <base /> <cache-store duration="300" /> </outbound> </policies> ``` However, when I make calls to the nested API, I receive a `504 Gateway Timeout` behavior intermittently, which seems to hint that the caching isn't effectively reducing the load on the backend as intended. I've verified that the nested API requests are indeed hitting the APIM but not properly caching responses. To troubleshoot, I've: 1. Checked that the backend service is responsive and that there are no issues with its availability. 2. Logged the requests on the nested APIs to confirm that they are going through APIM. 3. Tried applying the caching policy at the individual API level as well, but the behavior remains the same. I've also enabled diagnostics logs in APIM to help further investigate. What could be causing this scenario? Is there a specific configuration I need to be aware of when dealing with nested APIs in Azure API Management? Any advice on how to effectively apply these caching policies would be greatly appreciated! Any advice would be much appreciated.