Web.Config size

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am creating a web application which contains a Header (user control). The
header contains some labels which displayes infomation specific to page like
whats this, some page caption etc.
I wish to add some dynamism to this so that page specific label texts can
be modified without recompilation. i think using a XML file will do , but
that too with overhead of opening and closing the file on every page (any
better options so that file can be read once and used till any changes to
file.)
secondly i thought to use web.cofig (may be by making a separate
configuration section), that would work fine so long as it is 5,10 or 20
pages, what if there are 50 or more aspx page, will that effect peformance?
if not will the size of configuration file matter if it grows e.g. 1MB.
Using a DB can also solve my purpose, but i dont want that.

Thanks
 
Hi Tarun:

You can read the XML file into the cache as a single entry (or perhaps
multiple entries, depending on what you have), and then use the
CacheDependency class from System.Web.Caching to monitor the file for
changes. When the file changes, the dependency will kick out the cache
entries.

HTH,
 
Back
Top