title: how to calculate the space of a file in memorycache?
body: <p>my goal is to calculate how much space a file occupies in memorycache , 
  to do this I made a method that loads thousands of objects into memory and calculates the difference of some values ​​between before loading the objects and after , 
  this before file addition:</p>
  
  <pre><code>Process p = Process.GetCurrentProcess();
  long memoriaNonPaginata = p.NonpagedSystemMemorySize64;
  long memoriaPaginata = p.PagedMemorySize64;
  long memoriaDiSistema = p.PagedSystemMemorySize64;           
  long ramIniziale = memoriaNonPaginata + memoriaPaginata + memoriaDiSistema;
  </code></pre>
  
  <p>I add files:</p>
  
  <pre><code>while (counter &lt; numeroOggettiInCache)
  {
      string k = counter.ToString();
      data = data + k.Substring(0,1);
      int position = r.Next(0, 28000);
      data = data.Remove(position, 1);                
      _cache.CreateEntry("cucu" + counter.ToString());
      _cache.Set("cucu" + counter.ToString(), data, opt);                
      counter++;
  }    
  </code></pre>
  
  <p>I'm going to calculate the values ​​later:</p>
  
  <pre><code>Process p1 = Process.GetCurrentProcess();
  long memoriaNonPaginataPost = p1.NonpagedSystemMemorySize64;
  long memoriaPaginataPost = p1.PagedMemorySize64;
  long memoriaDiSistemaPost = p1.PagedSystemMemorySize64;
  long ramFinale = memoriaNonPaginataPost + memoriaPaginataPost + memoriaDiSistemaPost;
  </code></pre>
  
  <p>I ask if the properties I used (NonpagedSystemMemorySize64,PagedMemorySize64,PagedSystemMemorySize64) are correct and sufficient to calculate how much space the cached files use, thank you,regards</p>