コード例 #1
0
 public static void RemoveCache(string tableName, int channelId)
 {
     ListCache.Remove(channelId);
     ContentCache.Remove(channelId);
     CountCache.Clear(tableName);
     StlContentCache.ClearCache();
 }
コード例 #2
0
 public static void RemoveCache(int siteId, int channelId, string tableName)
 {
     RemoveListCache(siteId, channelId);
     ContentCache.Remove(channelId);
     CountCache.Clear(tableName);
     StlContentCache.ClearCache();
 }
コード例 #3
0
 public static void RemoveCacheBySiteId(string tableName, int siteId)
 {
     foreach (var channelId in ChannelManager.GetChannelIdList(siteId))
     {
         ListCache.Remove(channelId);
         ContentCache.Remove(channelId);
     }
     CountCache.Clear(tableName);
     StlContentCache.ClearCache();
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 public static void RemoveCountCache(string tableName)
 {
     CountCache.Clear(tableName);
     StlContentCache.ClearCache();
 }