Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caching of WebConfigurationManager.AppSettings?

I have a lot of requests that read my Web Config file

variable = WebConfigurationManager.AppSettings["BLAH"]

Do WebConfigurationManager.AppSettings read from disk each time, or is it cached in memory?

If it's read from disk each time then I guess I will need to move the variable to a static variable so as to improve my app performance.

like image 989
Cachor Avatar asked Nov 28 '10 21:11

Cachor


1 Answers

Configuration settings are cached in memory and web.config is not parsed every time you call this function.

like image 129
Darin Dimitrov Avatar answered Sep 22 '22 17:09

Darin Dimitrov