protected bool CacheFileExpired(string CacheFileName, int CacheTime)
{
// If cache is diabled, force the Controller to process
if (!Program.Config.BF2S_CacheEnabled) return true;
// Make sure we have loaded this file
if (CacheFile == null)
CacheFile = new FileInfo(Path.Combine(Program.RootPath, "Web", "Bf2Stats", "Cache", CacheFileName + ".html"));
// Cant be expired if we dont exist, so we force the Controller to process
if (!CacheFile.Exists) return true;
// Compare dates
return (DateTime.Now.CompareTo(CacheFile.LastWriteTime.AddMinutes(CacheTime)) > 0);
}