c# - Does RoleEnvironment.GetConfigurationSettingValue read everytime from cfg file? -
the azure role setting, useful since lets change values on-the-fly while iis running. problem is, if have plenty users, , if reads every time config value file, not best practice use without putting in static variable. next problem, if put in static variable, have reset iis every time change it. did research, , found similar question on stackoverflow, tells first time reads conf on file, stores on cache. question answered configurationmanager, mine rolemanager azure.
this line gets current setting on azure:
roleenvironment.getconfigurationsettingvalue("appname.settingkey");
this 1 saves in cache, know how works, , gets current setting ex.: connectionstring in webconfig:
configurationmanager.connectionstrings["settingkey"].connectionstring;
https://msdn.microsoft.com/en-us/library/azure/microsoft.windowsazure.serviceruntime.roleenvironment.changed.aspx here link changed.
if follow types down can to: https://msdn.microsoft.com/en-us/library/azure/microsoft.windowsazure.serviceruntime.roleenvironmentchange.aspx
which type sent changed event changes in general.
specifically here configuration value update: https://msdn.microsoft.com/en-us/library/azure/microsoft.windowsazure.serviceruntime.roleenvironmentconfigurationsettingchange.aspx
this lists settings changed. note not include values changed, names of settings, because changed event resets configuration cache read again since changes happened.
Comments
Post a Comment