Lycoris.CSRedisCore.Extensions
6.1.6
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Lycoris.CSRedisCore.Extensions --version 6.1.6
NuGet\Install-Package Lycoris.CSRedisCore.Extensions -Version 6.1.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lycoris.CSRedisCore.Extensions" Version="6.1.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lycoris.CSRedisCore.Extensions" Version="6.1.6" />
<PackageReference Include="Lycoris.CSRedisCore.Extensions" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lycoris.CSRedisCore.Extensions --version 6.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lycoris.CSRedisCore.Extensions, 6.1.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lycoris.CSRedisCore.Extensions@6.1.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lycoris.CSRedisCore.Extensions&version=6.1.6
#tool nuget:?package=Lycoris.CSRedisCore.Extensions&version=6.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
安装方式
// net cli
dotnet add package Lycoris.CSRedisCore.Extensions
// package magager
Install-Package Lycoris.CSRedisCore.Extensions
由于扩展服务全局静态服务,故注册位置请自行安排
单实例服务
实例注册
CSRedisCoreBuilder.AddSingleRedisInstance(opt =>
{
opt.Host = "your redis host";
opt.Port = 6379;
// redis6.0以上设置了用户名密码的情况下需要填写,其他情况不需要填写
//opt.UserName = "your redis username";
opt.Password = "your redis password";
opt.SSL = false;
// 不设置的情况下默认为 0 库
//opt.UseDatabase = 1;
// 是否尝试集群模式,阿里云、腾讯云集群需要设置此选项为 false
opt.TestCluster = false;
});
使用
// 写入 string类型 缓存
await RedisCache.String.SetAsync("testdemo", Guid.NewGuid().ToString(), TimeSpan.FromSeconds(60));
// 读取缓存
var cache = await RedisCache.String.GetAsync("testdemo");
多实例服务
实例注册
CSRedisCoreBuilder.AddMultipleRedisInstance("redis1", opt =>
{
opt.Host = "server.lycoris.cloud";
opt.Port = 8471;
opt.Password = "Yt@6JhDEoaTZVFAm";
opt.SSL = false;
// 是否尝试集群模式,阿里云、腾讯云集群需要设置此选项为 false
opt.TestCluster = false;
});
CSRedisCoreBuilder.AddMultipleRedisInstance("redis2", opt =>
{
opt.Host = "server.lycoris.cloud";
opt.Port = 8471;
opt.Password = "Yt@6JhDEoaTZVFAm";
opt.UseDatabase = 1;
opt.SSL = false;
// 是否尝试集群模式,阿里云、腾讯云集群需要设置此选项为 false
opt.TestCluster = false;
});
使用方式
// 从工厂中获取指定实例
var redis1 = RedisCacheFactory.GetInstance("redis1");
// 写入 string类型 缓存
await redis1.String.SetAsync("testdemo", Guid.NewGuid().ToString(), TimeSpan.FromSeconds(60));
// 读取缓存
var cache = await redis1.String.GetAsync("testdemo");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- CSRedisCore (>= 3.8.670)
- Microsoft.Extensions.Hosting.Abstractions (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.1 | 173 | 10/22/2025 |
| 8.0.0 | 227 | 8/30/2025 |
| 6.2.0-rc | 121 | 12/10/2024 |
| 6.1.6 | 179 | 11/18/2024 |
| 6.1.6-rc | 139 | 9/18/2024 |
| 6.1.5 | 201 | 9/18/2024 |
| 6.1.5-rc | 140 | 9/17/2024 |
| 6.1.4 | 184 | 5/28/2024 |
| 6.1.3-rc | 138 | 4/11/2024 |
| 6.1.2 | 200 | 4/11/2024 |
| 6.1.2-rc | 134 | 4/10/2024 |
| 6.1.1 | 194 | 4/9/2024 |
| 6.1.0 | 335 | 10/25/2023 |
| 6.0.7 | 165 | 10/24/2023 |
| 6.0.6 | 182 | 10/20/2023 |
| 6.0.5 | 184 | 9/21/2023 |
| 6.0.4 | 292 | 3/30/2023 |
| 6.0.3 | 289 | 3/30/2023 |