Ejemplo n.º 1
0
 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 { }
 }
Ejemplo n.º 2
0
 static void MediaServiceDeleting(IMediaService sender, Core.Events.DeleteEventArgs <Core.Models.IMedia> e)
 {
     DistributedCache.Instance.RemoveMediaCache(e.DeletedEntities.ToArray());
 }
Ejemplo n.º 3
0
 /// <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));
 }
Ejemplo n.º 4
0
 /// <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));
 }
Ejemplo n.º 5
0
 /// <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));
 }
Ejemplo n.º 6
0
 static void FileServiceDeletedStylesheet(IFileService sender, Core.Events.DeleteEventArgs <Stylesheet> e)
 {
     e.DeletedEntities.ForEach(x => DistributedCache.Instance.RemoveStylesheetCache(x));
 }
Ejemplo n.º 7
0
 static void DataTypeServiceDeleted(IDataTypeService sender, Core.Events.DeleteEventArgs <IDataTypeDefinition> e)
 {
     e.DeletedEntities.ForEach(x => DistributedCache.Instance.RemoveDataTypeCache(x));
 }
Ejemplo n.º 8
0
 static void LocalizationServiceDeletedDictionaryItem(ILocalizationService sender, Core.Events.DeleteEventArgs <IDictionaryItem> e)
 {
     e.DeletedEntities.ForEach(x => DistributedCache.Instance.RemoveDictionaryCache(x.Id));
 }
Ejemplo n.º 9
0
 private void ContentService_Deleted(IContentService sender, Core.Events.DeleteEventArgs <IContent> e)
 {
     e.DeletedEntities.ToList().ForEach(b => E.PageCache.Remove(b.Id));
 }