private void ContentService_Deleted(IContentService sender, Core.Events.DeleteEventArgs <IContent> e) { try { e.DeletedEntities.ToList().ForEach(b => { E.MyCache.Remove(b.Id); E.IPublishContentCache.Remove(b.Id); }); } catch { } }
static void MediaServiceDeleting(IMediaService sender, Core.Events.DeleteEventArgs <Core.Models.IMedia> e) { DistributedCache.Instance.RemoveMediaCache(e.DeletedEntities.ToArray()); }
/// <summary> /// Fires when a content type is deleted /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void ContentTypeServiceDeletedContentType(IContentTypeService sender, Core.Events.DeleteEventArgs <IContentType> e) { e.DeletedEntities.ForEach(contentType => DistributedCache.Instance.RemoveContentTypeCache(contentType)); }
/// <summary> /// Removes cache for template /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void FileServiceDeletedTemplate(IFileService sender, Core.Events.DeleteEventArgs <ITemplate> e) { e.DeletedEntities.ForEach(x => DistributedCache.Instance.RemoveTemplateCache(x.Id)); }
/// <summary> /// Fires when a langauge is deleted /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void LocalizationServiceDeletedLanguage(ILocalizationService sender, Core.Events.DeleteEventArgs <ILanguage> e) { e.DeletedEntities.ForEach(x => DistributedCache.Instance.RemoveLanguageCache(x)); }
static void FileServiceDeletedStylesheet(IFileService sender, Core.Events.DeleteEventArgs <Stylesheet> e) { e.DeletedEntities.ForEach(x => DistributedCache.Instance.RemoveStylesheetCache(x)); }
static void DataTypeServiceDeleted(IDataTypeService sender, Core.Events.DeleteEventArgs <IDataTypeDefinition> e) { e.DeletedEntities.ForEach(x => DistributedCache.Instance.RemoveDataTypeCache(x)); }
static void LocalizationServiceDeletedDictionaryItem(ILocalizationService sender, Core.Events.DeleteEventArgs <IDictionaryItem> e) { e.DeletedEntities.ForEach(x => DistributedCache.Instance.RemoveDictionaryCache(x.Id)); }
private void ContentService_Deleted(IContentService sender, Core.Events.DeleteEventArgs <IContent> e) { e.DeletedEntities.ToList().ForEach(b => E.PageCache.Remove(b.Id)); }