public static void UpdateCache(SiteInfo siteInfo, ChannelInfo channelInfo, ContentInfo contentInfoToUpdate) { var dict = ContentCache.GetContentDict(channelInfo.Id); var contentInfo = GetContentInfo(siteInfo, channelInfo, contentInfoToUpdate.Id); if (contentInfo != null) { if (ListCache.IsChanged(channelInfo, contentInfo, contentInfoToUpdate)) { ListCache.Remove(channelInfo.Id); } if (CountCache.IsChanged(contentInfo, contentInfoToUpdate)) { var tableName = ChannelManager.GetTableName(siteInfo, channelInfo); CountCache.Remove(tableName, contentInfo); CountCache.Add(tableName, contentInfoToUpdate); } } dict[contentInfoToUpdate.Id] = contentInfoToUpdate; StlContentCache.ClearCache(); }
public static void UpdateCache(SiteInfo siteInfo, ChannelInfo channelInfo, ContentInfo contentInfo) { var dict = ContentCache.GetContentDict(channelInfo.Id); ListCache.Remove(channelInfo.Id); var tableName = ChannelManager.GetTableName(siteInfo, channelInfo); CountCache.Remove(tableName, contentInfo); CountCache.Add(tableName, contentInfo); dict[contentInfo.Id] = contentInfo; StlContentCache.ClearCache(); }