title: Static objects for Web API 2
body: <p>i have a web api 2 project the client will request some data that is in a xml format. That XML will never change and i am wondering how i could keep it in ram so that it doesnt deserialize the xml each time it needs data from that file.</p>
  
  <p>Would deserializing it at launch and then keep it in a static variable be the best way as it will only be use for reading ?</p>
  
  <pre><code> [HttpPost]
   [Route("api/dosomething")]
   public string DoSomething() {
  
       var myData = XmlSerializer(MyDataStruct).Deserialize(something);
       return myDate;
   }
  </code></pre>
  
  <p>Here the xml is only used to communicate values to clients. How can i make it so that i could deserialize it once and then return that directly. Would using static member enable this feature ?</p>