public bool HasPageChanged(string url) { DateTime lastPublishedDate = DateTime.MinValue; if (CacheService.ContainsLastPublishDate(url)) { lastPublishedDate = CacheService.GetLastPublishDate(url); } var dbLastPublishedDate = GetLastPublishedDateByUrl(url); if (lastPublishedDate != DateTime.MinValue && lastPublishedDate.Subtract(dbLastPublishedDate).TotalSeconds >= 0) { return(false); } else { CacheService.SetLastPublishDate(url, dbLastPublishedDate); return(true); } }
public bool HasPageChanged(TcmUri tcmUri) { DateTime lastPublishedDate = DateTime.MinValue; string stringUri = tcmUri.ToString(); if (CacheService.ContainsLastPublishDate(stringUri)) { lastPublishedDate = CacheService.GetLastPublishDate(stringUri); } var dbLastPublishedDate = GetLastPublishedDateByUri(stringUri); if (lastPublishedDate != DateTime.MinValue && lastPublishedDate.Subtract(dbLastPublishedDate).TotalSeconds >= 0) { return(false); } else { CacheService.SetLastPublishDate(stringUri, dbLastPublishedDate); return(true); } }