Skip to content

Commit

Permalink
MemoryCache达到两千万
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Nov 10, 2018
1 parent c7b13ae commit 4e01fa8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Readme.MD
Expand Up @@ -184,4 +184,9 @@ Bench 会分根据线程数分多组进行添删改压力测试。
rand 参数,是否随机产生key/value
batch 批大小,分批执行读写操作,借助GetAll/SetAll进行优化。

Redis默认设置AutoPipeline=100,无分批时打开管道操作,对添删改优化。
Redis默认设置AutoPipeline=100,无分批时打开管道操作,对添删改优化。

### Redis的兄弟姐妹
Redis实现ICache接口,它的孪生兄弟MemoryCache,内存缓存,千万级吞吐率。
各应用强烈建议使用ICache接口编码设计,小数据时使用MemoryCache实现;
数据增大(10万)以后,改用Redis实现,不需要修改业务代码。
1 change: 1 addition & 0 deletions Test/Program.cs
Expand Up @@ -124,6 +124,7 @@ static void Test3()
static void Test4()
{
var ic = Redis.Create("127.0.0.1:6000", 5);
//var ic = new MemoryCache();
ic.Bench();
}
}
Expand Down

0 comments on commit 4e01fa8

Please sign in to comment.