|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
Garnet is a remote cache-store from Microsoft Research that offers strong performance (throughput and latency), scalability, storage, recovery, cluster sharding, key migration, and replication features. Garnet can work with existing Redis clients.
|
|
|
|
|
|
-微软基于.net开源的缓存数据库,对标redis, **代码非常简单**
|
|
|
+微软基于 .net 开源的缓存数据库,对标 redis,可通过 redis-cli 各客户端连接, **代码非常简单**
|
|
|
|
|
|
## Develop
|
|
|
|
|
@@ -35,3 +35,24 @@ sudo apt-get install dotnet-sdk-5.0
|
|
|
docker compose -f docker-compose.yml up -d --build
|
|
|
|
|
|
```
|
|
|
+
|
|
|
+
|
|
|
+C#中使用:
|
|
|
+
|
|
|
+```
|
|
|
+using Garnet;
|
|
|
+
|
|
|
+try
|
|
|
+{
|
|
|
+ using var server = new GarnetServer(args);
|
|
|
+ server.Start();
|
|
|
+ Thread.Sleep(Timeout.Infinite);
|
|
|
+}
|
|
|
+catch (Exception ex)
|
|
|
+{
|
|
|
+ Console.WriteLine($"Unable to initialize server due to exception: {ex.Message}");
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+```
|
|
|
+可轻易启动一个garent服务
|