public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { // ContentService cs = new ContentService(); // cs.RePublishAll(); umbraco.library.RefreshContent(); }
public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { if (itemId != null) { Guid g; if (Guid.TryParse(itemId.Id, out g)) { try { if (itemId.ProviderId == ProviderIDCollection.mediaItemProviderGuid) { ReindexMedia(g, itemId); } else if (itemId.ProviderId == ProviderIDCollection.documentItemProviderGuid) { ReindexContent(g, itemId); } } catch (Exception ex) { RevisionLog.Instance.AddItemEntry(itemId, this.GetType(), "UpdateLuceneIndexes", ex.ToString(), LogItemEntryType.Error); } } } }
public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { try { Cache.ClearCacheByKeySearch("UmbracoContentType"); Cache.ClearCacheByKeySearch("ContentType_PropertyTypes_Content"); Cache.ClearCacheByKeySearch("Tab_PropertyTypes_Content"); } catch (Exception ex) { Core.Helpers.Logging._Error(ex.ToString()); } }
public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { try { // Clear Dictionary cache var dictionaryStaticType = typeof(umbraco.cms.businesslogic.Dictionary); var lockObj = dictionaryStaticType.GetField("m_Locker", BindingFlags.NonPublic | BindingFlags.Static) .IfNotNull(f => f.GetValue(null)); if (lockObj != null) { lock (lockObj) { dictionaryStaticType.GetField("cacheIsEnsured", BindingFlags.NonPublic | BindingFlags.Static) .IfNotNull(f => f.SetValue(null, false)); dictionaryStaticType.GetField("DictionaryItems", BindingFlags.NonPublic | BindingFlags.Static) .IfNotNull(f => f.SetValue(null, Hashtable.Synchronized(new Hashtable()))); } } }catch (Exception ex) { Umbraco.Courier.Core.Helpers.Logging._Debug(ex.ToString()); } try { // Clear Item (text) cache var itemType = typeof(umbraco.cms.businesslogic.language.Item); var lockObj = itemType.GetField("m_Locker", BindingFlags.NonPublic | BindingFlags.Static) .IfNotNull(f => f.GetValue(null)); if (lockObj != null) { lock (lockObj) { itemType.GetField("m_IsInitialize", BindingFlags.NonPublic | BindingFlags.Static) .IfNotNull(f => f.SetValue(null, false)); itemType.GetField("_items", BindingFlags.NonPublic | BindingFlags.Static) .IfNotNull(f => f.SetValue(null, Hashtable.Synchronized(new Hashtable()))); } } } catch (Exception ex) { Umbraco.Courier.Core.Helpers.Logging._Debug(ex.ToString()); } }
public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { try { if (umbraco.UmbracoSettings.UseDistributedCalls) { Template t = Template.GetByAlias(itemId.Id); if (t != null) { umbraco.presentation.cache.dispatcher.Refresh( new Guid("DD12B6A0-14B9-46e8-8800-C154F74047C8"), t.Id); } } } catch (Exception ex) { Umbraco.Courier.Core.Helpers.Logging._Debug(ex.ToString()); } }
public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { try { if (umbraco.UmbracoSettings.UseDistributedCalls) { Macro m = new Macro(itemId.Id); if (m != null) { umbraco.presentation.cache.dispatcher.Refresh( new Guid("7B1E683C-5F34-43dd-803D-9699EA1E98CA"), m.Id); } } } catch (Exception ex) { Umbraco.Courier.Core.Helpers.Logging._Debug(ex.ToString()); } }
public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { Guid g; if (Guid.TryParse(itemId.Id, out g)) { try { umbraco.cms.businesslogic.web.Document d = new umbraco.cms.businesslogic.web.Document(g); if (d != null) { d.UnPublish(); umbraco.library.UnPublishSingleNode(d.Id); } } catch (Exception ex) { Umbraco.Courier.Core.Diagnostics.Logging.RevisionLog.Instance.AddItemEntry(itemId, this.GetType(), "UnpushlishDocument", ex.ToString(), Core.Diagnostics.Logging.LogItemEntryType.Error); } } }
public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { Guid g; if (Guid.TryParse(itemId.Id, out g)) { try { umbraco.cms.businesslogic.web.Document d = new umbraco.cms.businesslogic.web.Document(g); if (d != null && d.Published && d.ReleaseDate < DateTime.Now) { d.XmlGenerate(new XmlDocument()); umbraco.library.UpdateDocumentCache(d.Id); } } catch (Exception ex) { Core.Helpers.Logging._Debug(ex.ToString()); } } }
public override void Execute(Core.ItemIdentifier itemId, Core.SerializableDictionary <string, string> Parameters) { umbraco.library.RefreshContent(); }