Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you take a disk "hit" every time you retrieve a web.config value?

I have the following line of code called very often:

var configValue = System.Configuration.ConfigurationManager.AppSettings["ConfigValueKey"]; 

Do I take a disk hit for ASP.Net to retrieve the item from the web.config, or is it smart enough to cache the value in memory and only refresh the cache when the web.config changes?

like image 777
Peter Walke Avatar asked Jan 27 '26 21:01

Peter Walke


1 Answers

It is smart enough to cache all the attributes.

like image 161
Kangkan Avatar answered Jan 29 '26 12:01

Kangkan