/// <summary> /// 高速片段缓存,提供了相关的基本操作 /// </summary> /// <param name="lease">生命周期租约</param> /// <param name="realSize">内部真实缓存数据大小</param> /// <exception cref="ArgumentException">非法的参数取值围范围</exception> /// <exception cref="ArgumentNullException">参数不空为能</exception> public HightSpeedSegmentCache(ICacheLease lease, int realSize) { if (lease == null) { throw new ArgumentNullException(nameof(lease)); } if (realSize < 0) { throw new ArgumentException("Illegal real size."); } _realSize = realSize; _lease = lease; }