AA2Install.formMain.FlushCache C# (CSharp) Method

FlushCache() public method

Deletes cache and rebuilds configuration file.
public FlushCache ( ) : void
return void
        public void FlushCache()
        {
            imageTimer.Enabled = false;

            if (imagePreview.Image != null)
                imagePreview.Image.Dispose();
            imagePreview.Image = null;

            imageLoop.Clear();
            if (Directory.Exists(Paths.CACHE))
                TryDeleteDirectory(Paths.CACHE);
            Directory.CreateDirectory(Paths.CACHE + "\\");

            modDict = new ModDictionary();

            Configuration.saveMods(modDict);
            txtSearch.Text = "";
        }
        #endregion