Removed cache refreshing code from inside of the ascx control as it is now all handled via business logic.

This commit is contained in:
Shannon Deminick
2013-03-20 22:03:35 +06:00
parent e7a6a29e59
commit aa7fd7bb2b
2 changed files with 2 additions and 34 deletions

View File

@@ -84,25 +84,7 @@ namespace Umbraco.Web.Cache
/// <param name="sender"></param>
/// <param name="e"></param>
static void ContentTypeServiceSavedContentType(IContentTypeService sender, Core.Events.SaveEventArgs<IContentType> e)
{
//NOTE: This needs to be put in the Service layer...
//var needsContentRefresh = e.SavedEntities.Any(contentType =>
// {
// //before we send the call to update the cache, we need to determine if we need to refresh the xml content
// //in the database. This is to be done when:
// // - a content type changes it's alias
// // - if a content type has it's property removed
// //here we need to check if the alias of the content type changed or if one of the properties was removed.
// var dirty = contentType as IRememberBeingDirty;
// return dirty != null && (dirty.WasPropertyDirty("Alias") || dirty.WasPropertyDirty("HasPropertyTypeBeenRemoved"));
// });
////if we need to refresh the content cache, we need to re-create the xml content in the database before sending out
////the request to refresh the application cache
//ApplicationContext.Current.Services.ContentService.RePublishAll();
//now send the cache refresh call!
{
e.SavedEntities.ForEach(contentType => DistributedCache.Instance.RemoveContentTypeCache(contentType));
}