Example #1
0
 /// <summary>
 /// 获取连接超时时间。
 /// </summary>
 /// <param name="descriptor">缓存描述述符。</param>
 /// <param name="groupName">失效时间。</param>
 /// <returns>缓存描述符。</returns>
 public static int ConnectTimeout(this CacheDescriptor descriptor)
 {
     return(descriptor.GetMetadata <int>("ConnectTimeout", 60));
 }
Example #2
0
 /// <summary>
 /// 获取默认失效时间 。
 /// </summary>
 /// <param name="descriptor">缓存描述符。</param>
 /// <returns>失效时间。</returns>
 public static int DefaultExpireTime(this CacheDescriptor descriptor)
 {
     return(descriptor.GetMetadata <int>("DefaultExpireTime", 60));
 }