wondering if the contents of web.config is already loaded into cache, and
if there is any benefit loading data from web.config into cache variables?
faster access?.
i.e. web.config
<add key="ConnectionString" value="SERVER=abc; DATABASE=xyz; UID=sa;
PWD=;" />
<add key="OtherImportantInfo" value="some value" />
1. access directly from config file in an aspx page
string connection = System.Configuration.ConfigurationSettings.AppSettings
["ConnectionString"];
2. or load into cache during Application_Start in global.asax
Context.Cache ["ConnectionString"] =
System.Configuration.ConfigurationSettings.AppSettings
["ConnectionString"];
then in aspx page
string connection = Cache["ConnectionString"].ToString ()
is there any performance benefit to #2 ?
any feedback would be appreciated.