/// <summary>
/// Set the location for caching and delete any old cache info
/// </summary>
/// <param name="domain">Our domain</param>
private void ConfigureCachePath(AppDomain domain)
{
cachePath = String.Format(@"{0}\{1}",
ConfigurationSettings.AppSettings["shadowfiles.path"], DateTime.Now.Ticks);
cachePath = Environment.ExpandEnvironmentVariables(cachePath);
DirectoryInfo dir = new DirectoryInfo(cachePath);
if(dir.Exists) dir.Delete(true);
domain.SetCachePath(cachePath);
return;
}