tag:blogger.com,1999:blog-6698224.post-1084135833764871812004-05-09T15:47:00.000-05:002004-08-11T10:56:37.370-05:00How to clear the Downloaded Cache programatically?<span style="font-family:trebuchet ms;font-size:85%;">The most important thing that you must considerate before clear the Downloade Cache programmatically it's that the .NET Framework has a default 50MB quota for this cache, so that you don't have to worry about the growing without a size controlled. Additionally, this API won't work for further versions of the .NET Framework. Please check the </span><a href="http://blogs.gotdotnet.com/alanshi/CategoryView.aspx/Assembly%20Download"><span style="font-family:trebuchet ms;font-size:85%;">Alan Shi's blog</span></a><span style="font-family:trebuchet ms;"><span style="font-size:85%;"> for more information. <br />The following C# code clears the Downloaded Cache: <br /></spam></span></span><span style="font-size:85%;"><span style="font-family:trebuchet ms;"><span style="font-family:arial;"><span style="font-size:78%;"></span></span></span></span> <br /><span style="font-size:85%;"><span style="font-family:trebuchet ms;"><span style="font-family:arial;"><span style="font-size:78%;">using System.Runtime.InteropServices; <br />sealed class App <br />{ <br /> [DllImport("fusion.dll")] <br /> static extern void NukeDownloadedCache(); <br /> static void Main() <br /> { <br /> NukeDownloadedCache(); <br /> } <br />}</span> <br /></span></span></span><span style="font-size:85%;"><span style="font-family:trebuchet ms;"></span></span> <br /><span style="font-size:85%;"><span style="font-family:trebuchet ms;"> <br /> <br /> <br /></span></span><span style="font-size:85%;"><span style="font-family:trebuchet ms;"></span></span><span style="font-size:85%;"><span style="font-family:trebuchet ms;"></span></span>Danielhttp://www.blogger.com/profile/17636031092965440114noreply@blogger.com