External cache is not working as expected for the APIM

AB, Anand 20 Reputation points
2026-06-18T09:46:12.5733333+00:00

I am trying to enable semantic caching for the APIM. I have updated the policy as per the documentaions, however during the trace, it is noticed that it is showing an error message "``No appropriate cache found for provided policy configuration. Policy execution will be skipped.``"

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

0 comments No comments

Answer accepted by question author

Rakesh Mishra 10,280 Reputation points Microsoft External Staff Moderator
2026-06-18T10:51:50.93+00:00

Hello Anand,

Thank you for reaching out to the Microsoft Q&A community.

Cause: The cache instance was created using terraform and cache ID used was a custom unique name instead of "default".

As per guidance from backend team, below steps resolved the issue. 

  1. Delete the existing external cache connection
  2. Re-create using the Azure Portal and make sure to select either "Default" from the drop down or select "Germany West Central".
  3. If you prefer to use terraform script, you should ensure that the cache ID is "default" or specify the correct region name in "Use From".
    • Sample terraform script:
           resource "azurerm_api_management_redis_cache" "platform" {
             name              = "default" # This changes the backend cacheId to match the location
             api_management_id = azurerm_api_management.platform.id
             connection_string = "${azurerm_managed_redis.redis.hostname}:6380,password=${azurerm_managed_redis.redis.primary_access_key},ssl=True,abortConnect=False"
             description       = "Redis cache for APIM policies"
             redis_cache_id    = azurerm_managed_redis.redis.id
             cache_location    = "default"
             
             depends_on = [
               azurerm_api_management.platform,
               azurerm_managed_redis.redis,
             ]
           }
      

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.