static MemoryCommandContext() { /*一个系统如果有上w个聚合根一起活动已经很厉害了*/ int capacity = 10000; /*guid使用最多,所以可以是4W,int使用最少,用200个*/ GuidCountCache = new CounterDictCache <Guid, IAggregateRoot>(capacity * 4); LongCountCache = new CounterDictCache <long, IAggregateRoot>(500); IntCountCache = new CounterDictCache <int, IAggregateRoot>(200); StringCountCache = new CounterDictCache <string, IAggregateRoot>(capacity); }
/// <summary> /// /// </summary> static UserAuthorizeAttribute() { counterDict = new CounterDictCache <string, AppUser>(200); }