public static void InsertCache(SiteInfo siteInfo, ChannelInfo channelInfo, IContentInfo contentInfo) { if (contentInfo.SourceId == SourceManager.Preview) { return; } var contentIdList = ListCache.GetContentIdList(channelInfo.Id); if (ETaxisTypeUtils.Equals(ETaxisType.OrderByTaxisDesc, channelInfo.Additional.DefaultTaxisType)) { contentIdList.Insert(0, contentInfo.Id); } else { ListCache.Remove(channelInfo.Id); } var dict = ContentCache.GetContentDict(contentInfo.ChannelId); dict[contentInfo.Id] = (ContentInfo)contentInfo; var tableName = ChannelManager.GetTableName(siteInfo, channelInfo); var countInfoList = GetContentCountInfoList(tableName); var countInfo = countInfoList.FirstOrDefault(x => x.SiteId == siteInfo.Id && x.ChannelId == channelInfo.Id && x.IsChecked == contentInfo.IsChecked.ToString() && x.CheckedLevel == contentInfo.CheckedLevel); if (countInfo != null) { countInfo.Count++; } StlContentCache.ClearCache(); CountCache.Clear(tableName); }
public static int GetCount(SiteInfo siteInfo, ChannelInfo channelInfo, bool isChecked) { return(CountCache.GetChannelCountByIsChecked(siteInfo, channelInfo, isChecked)); }
public static int GetCount(SiteInfo siteInfo, ChannelInfo channelInfo, int adminId, bool isAllContents = false) { return(CountCache.GetChannelCount(siteInfo, channelInfo, adminId, isAllContents)); }
public static int GetCountChecking(SiteInfo siteInfo) { return(CountCache.GetSiteCountIsChecking(siteInfo)); }
public static int GetCount(SiteInfo siteInfo, ChannelInfo channelInfo, int?onlyAdminId) { return(CountCache.GetChannelCountByOnlyAdminId(siteInfo, channelInfo, onlyAdminId)); }
public static int GetCount(SiteInfo siteInfo, bool isChecked) { return(CountCache.GetSiteCountByIsChecked(siteInfo, isChecked)); }
public static void RemoveCountCache(string tableName) { CountCache.Clear(tableName); StlContentCache.ClearCache(); }