title: The Most efficient and cached way to read from Xml files
body: <p>I have an xml file that will be read many times from the source code. I would like to know the efficient way in which i can read only once [ during application start ] the xml file and then  cache its contents so that i can reuse it efficiently and fastly.</p>
  
  <p>I am using C# 4. Kindly suggest the best practice for efficient caching and reading.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Found this resource : <a href="http://www.codeproject.com/Articles/51409/Exploring-Caching-Using-Caching-Application-Enterp" rel="nofollow">CodeProject Article</a></p>
  
  <p>I have loaded the xml file into an XmlDocument and Cached it using Enterprise Library as follows,</p>
  
  <pre><code>XmlDocument xdoc = new XmlDocument();
  xdoc.Load("MyXmlFile.XML");
  FileDependency fileDependency=new FileDependency("MyXmlFile.XML");
  cacheManager.Add("XConfig", xdoc, CacheItemPriority.Normal, null, fileDependency);
  </code></pre>