I have created a .net webapi app and using azure app configuration and setup auto-refresh with a sentinel key with cache expiration of 5 seconds
new AppSettings().demoKey = 1
new AppSettings().demoKey = 2
I am expecting to get the updated value of demokey (2 in this case) in the first request itself that I hit immediately after updating the value on azure app config
Expected behaviour:
new AppSettings().demoKey = 1
new AppSettings().demoKey = 2
The behavior observed is by design. Please see discussions in the document Request-driven configuration refresh.
The configuration refresh happens asynchronously to the processing of your app's incoming requests. It will not block or slow down the incoming request that triggered the refresh. The request that triggered the refresh may not get the updated configuration values, but later requests will get new configuration values.