@M Fuzail Ahmed ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you've configured caching on your Azure Front Door for one of the URL path with wild card which is accessing the dynamic images from your application, but when you check the browser trace, you see CONFIG_NOCACHE in the response header. You would like to know how to cache the URL path and what could be the reason for not caching it.
Front Door attaches the X-Cache header to all responses.
CONFIG_NOCACHE means request is configured to not cache in the Front Door profile.
Azure Front Door cache behior and duration can be configured in rules engine. And Rules Engine caching configuration always overrides the route configuration.
When caching is disabled, Azure Front Door doesn’t cache the response contents, irrespective of the origin response directives. When caching is enabled, the cache behior is different depending on the cache behior value applied by the Rules Engine.Refer: https://learn.microsoft.com/en-us/azure/frontdoor/front-door-caching?pivots=front-door-standard-premium#cache-behior-and-duration
Please check if you he configured any rule set with caching behior and associated that rule set to your route.
Refer: https://learn.microsoft.com/en-us/azure/frontdoor/standard-premium/how-to-configure-rule-set
Regards,
Gita