Hello All,
I need some help on optimizing a piece of code. Currently this is how we
retrieve our Oracle's connection string for executing all the queries in our
application.
public string GetOracleClientConnectionString()
{
string strConnectionString =
System.Configuration.ConfigurationSettings.AppSett ings["ConnectionString"];
return strConnectionString;
}
So each time, it has to look up in the web.config file, read the
ConnectionString and return it. Is there any way I could optimize this or
make this more efficient?
Can I store the connection string in cache or as a static variable? So if I
store this in cache would the serialization/deserialization be an overhead?
Thanks