/// <summary> /// Gets the list cache key prefix. /// </summary> /// <returns>The list cache key prefix.</returns> /// <param name="cacheVersionType">Cache version type.</param> /// <param name="areaCachePropertyName">Area cache property name.</param> /// <param name="areaCachePropertyValue">Area cache property value.</param> public string GetListCacheKeyPrefix(CacheVersionType cacheVersionType, string areaCachePropertyName, object areaCachePropertyValue) { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(this.TypeHashID); stringBuilder.Append("-L:"); switch (cacheVersionType) { case CacheVersionType.GlobalVersion: stringBuilder.AppendFormat("{0}:", this.GetGlobalVersion()); break; case CacheVersionType.AreaVersion: stringBuilder.AppendFormat("{0}-{1}-{2}:", areaCachePropertyName, areaCachePropertyValue, this.GetAreaVersion(areaCachePropertyName, areaCachePropertyValue)); break; } return(stringBuilder.ToString()); }
/// <summary> /// 获取列表缓存CacheKey的前缀(例如:abe3ds2sa90:8:) /// </summary> /// <param name="cacheVersionType"></param> /// <param name="areaCachePropertyName">缓存分区名称</param> /// <param name="areaCachePropertyValue">缓存分区值</param> /// <returns></returns> public string GetListCacheKeyPrefix(CacheVersionType cacheVersionType, string areaCachePropertyName, object areaCachePropertyValue) { StringBuilder cacheKeyPrefix = new StringBuilder(TypeHashID); cacheKeyPrefix.Append("-L:"); switch (cacheVersionType) { case CacheVersionType.GlobalVersion: cacheKeyPrefix.AppendFormat("{0}:", GetGlobalVersion()); break; case CacheVersionType.AreaVersion: cacheKeyPrefix.AppendFormat("{0}-{1}-{2}:", areaCachePropertyName, areaCachePropertyValue, GetAreaVersion(areaCachePropertyName, areaCachePropertyValue)); break; } return(cacheKeyPrefix.ToString()); }
/// <summary> /// 获取列表缓存CacheKey的前缀(例如:abe3ds2sa90:8:) /// </summary> /// <param name="cacheVersionType">列表缓存版本设置</param> /// <returns>列表缓存CacheKey的前缀</returns> public string GetListCacheKeyPrefix(CacheVersionType cacheVersionType) { return(GetListCacheKeyPrefix(cacheVersionType, null, null)); }
public ContentItemQuery(CacheVersionType cacheVersionType) { this.cacheVersionType = cacheVersionType; this.SortBy = ContentItemSortBy.ReleaseDate_Desc; }
public ContentItemQuery(CacheVersionType cacheVersionType) { this.cacheVersionType = cacheVersionType; this.SortBy = ContentItemSortBy.ReleaseDate_Desc; }
/// <summary> /// 获取列表缓存CacheKey的前缀(例如:abe3ds2sa90:8:) /// /// </summary> /// <param name="cacheVersionType"/><param name="areaCachePropertyName">缓存分区名称</param><param name="areaCachePropertyValue">缓存分区值</param> /// <returns/> public string GetListCacheKeyPrefix(CacheVersionType cacheVersionType, string areaCachePropertyName, object areaCachePropertyValue) { StringBuilder stringBuilder = new StringBuilder(this.TypeHashID); stringBuilder.Append("-L:"); switch (cacheVersionType) { case CacheVersionType.GlobalVersion: stringBuilder.AppendFormat("{0}:", (object) this.GetGlobalVersion()); break; case CacheVersionType.AreaVersion: stringBuilder.AppendFormat("{0}-{1}-{2}:", (object) areaCachePropertyName, areaCachePropertyValue, (object) this.GetAreaVersion(areaCachePropertyName, areaCachePropertyValue)); break; } return stringBuilder.ToString(); }
/// <summary> /// 获取列表缓存CacheKey的前缀(例如:abe3ds2sa90:8:) /// /// </summary> /// <param name="cacheVersionType">列表缓存版本设置</param> /// <returns> /// 列表缓存CacheKey的前缀 /// </returns> public string GetListCacheKeyPrefix(CacheVersionType cacheVersionType) { return this.GetListCacheKeyPrefix(cacheVersionType, (string) null, (object) null); }