title: WPF Fonts.GetFontFamilies() caches the list of fonts, how to clear the cache?
body: <p>In WPF, the following code returns a list of all fonts in the given location:</p>
  
  <pre><code>foreach (var fontFamily in Fonts.GetFontFamilies(@"C:\Dummy\Fonts\"))
  {
      System.Diagnostics.Debug.WriteLine(fontFamily.Source);
  }
  </code></pre>
  
  <p>The problem is if you <strong>change</strong> the content of that folder (add or remove a font) and run this code again, it returns the same list (as it is <strong>cached</strong> somewhere internally).</p>
  
  <p>This cache will not be cleared until you <strong>exit</strong> the application!</p>
  
  <p>Is there any way to prevent this behaviour and always make WPF to look into that folder for fonts at that moment?</p>
  
  <p><strong>NOTE:</strong> The result is the same regardless of <em>"Windows Presentation Foundation Font Cache 3.0.0.0"</em> service state is started or stopped. Apparently this specific type of cache is not being handled by the service.</p>