Can you try chaining the Configure Refresh with the Select. For e.g.
options.Connect(azAppConfigConnection)
.Select("dbConnectionString", "Production").ConfigureRefresh(refresh =>........
........
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
With Azure App Config how can I ensure to read only once a day from a key? I tried:
config.AddAzureAppConfiguration(options =>
{
options.Connect(azAppConfigConnection)
.Select("dbConnectionString", "Production");
options.ConfigureRefresh(refresh =>
{
// Register for refresh operation.
refresh.Register("dbConnectionString", "Production").SetCacheExpiration(TimeSpan.FromSeconds(86400));
});
refresher = options.GetRefresher();
});
The above snippet to read only once a day, but it still keeps on reading for every request. I am not sure of what I am missing. Any help would be much appreciated.
Can you try chaining the Configure Refresh with the Select. For e.g.
options.Connect(azAppConfigConnection)
.Select("dbConnectionString", "Production").ConfigureRefresh(refresh =>........
........
Hi @Rajarajacholan Krishnamurthy ,
Thanks for reaching out to Q&A forum.
Configuration builder and AddAzureAppConfiguration should be called at the start of the application. This makes sure that it is called only once. If the application builds configuration instances multiple times along the way, it will send requests to Azure AppConfiguration each time.