NewLife.Redis.Core
1.4.2022.1213
See the version list below for details.
dotnet add package NewLife.Redis.Core --version 1.4.2022.1213
NuGet\Install-Package NewLife.Redis.Core -Version 1.4.2022.1213
<PackageReference Include="NewLife.Redis.Core" Version="1.4.2022.1213" />
<PackageVersion Include="NewLife.Redis.Core" Version="1.4.2022.1213" />
<PackageReference Include="NewLife.Redis.Core" />
paket add NewLife.Redis.Core --version 1.4.2022.1213
#r "nuget: NewLife.Redis.Core, 1.4.2022.1213"
#:package NewLife.Redis.Core@1.4.2022.1213
#addin nuget:?package=NewLife.Redis.Core&version=1.4.2022.1213
#tool nuget:?package=NewLife.Redis.Core&version=1.4.2022.1213
NewLife.Redis.Core
<h1>一、项目说明</h1> <p>NewLife.Redis.Core基于新生命团队NewLife.Redis的封装,支持.NETCore3/.NET5/.NET6/.NET7。</p> <p dir="auto"><span style="color: #e03e2d;">NewLife.Redis</span> 是一个Redis客户端组件,以高性能处理大数据实时计算为目标。</p> <p dir="auto">源码: <a href="https://github.com/NewLifeX/NewLife.Redis">https://github.com/NewLifeX/NewLife.Redis</a><br />Nuget:NewLife.Redis<br />教程:<a href="https://newlifex.com/core/redis" rel="nofollow">https://newlifex.com/core/redis</a></p> <h1>二、使用说明</h1> <h2>2.1 通过New的方式安装使用</h2>
using NewLife.Redis.Core;
NewLifeRedis redis = new NewLifeRedis("server=127.0.0.1:6379;password=xxx;db=4");
//普通操作
redis.Set("test", "1");
Console.WriteLine(redis.Get<string>("test"));
//列表
redis.ListAdd("listtest", 1);
redis.ListGetAll<string>("listtest");
//SortedSet
redis.SortedSetAdd("sortsettest", "1", 1.0);
redis.SortedSetIncrement("sortsettest", "1", 1.0);
//set
redis.SetAdd("settest", "2");
//哈希
redis.HashAdd("hashtest", "1", "2");
redis.HashGet<string>("hashtest", new string[] { "1" });
//队列操作
//方式1
var queue = redis.GetRedisQueue<string>("queue");
queue.Add("test");
var data = queue.Take(1);
//方式2
redis.AddQueue("queue", "1");
redis.GetQueueOne<string>("queue");
<h2>2.2 通过IOC注入</h2> <p>ConfigureServices里注册组件</p>
//默认读取配置文件:ConnectionStrings:Redis
services.AddRedisCacheManager();
//指定链接字符串
services.AddRedisCacheManager("server=127.0.0.1:6379;password=xxx;db=4");
<p>构造函数里注入IRedisCacheManager</p>
private readonly ILogger<Worker> _logger;
private readonly IRedisCacheManager _redisCacheManager;
public Worker(ILogger<Worker> logger, IRedisCacheManager redisCacheManager)
{
_logger = logger;
this._redisCacheManager = redisCacheManager;
var data = _redisCacheManager.Get<string>("test");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- NewLife.Redis (>= 5.0.2022.1201)
-
net5.0
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- NewLife.Redis (>= 5.0.2022.1201)
-
net6.0
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- NewLife.Redis (>= 5.0.2022.1201)
-
net7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- NewLife.Redis (>= 5.0.2022.1201)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on NewLife.Redis.Core:
Repository | Stars |
---|---|
dorisoy/Dorisoy.Pan
Dorisoy.Pan 是基于.net core8 的跨平台文档管理系统,使用 MS SQL 2012 / MySql8.0(或更高版本)后端数据库,您可以在 Windows、Linux 或 Mac 上运行它,项目中的所有方法都是异步的,支持令牌基身份验证,项目体系结构遵循著名的软件模式和最佳安全实践。源代码是完全可定制的,热插拔且清晰的体系结构,使开发定制功能和遵循任何业务需求变得容易。 系统使用最新的 Microsoft 技术,高性能稳定性和安全性
|
Version | Downloads | Last Updated |
---|---|---|
2.0.2025.516-beta0631 | 227 | 5/16/2025 |
1.9.2023.1211 | 5,684 | 12/11/2023 |
1.9.2023.1205 | 205 | 12/5/2023 |
1.8.2023.918 | 582 | 9/18/2023 |
1.8.2023.830 | 291 | 9/8/2023 |
1.8.2023.421 | 3,080 | 4/21/2023 |
1.7.2022.1220 | 3,411 | 12/20/2022 |
1.6.2022.1219 | 416 | 12/19/2022 |
1.5.2022.1214 | 477 | 12/14/2022 |
1.4.2022.1213 | 399 | 12/13/2022 |
1.3.2022.1213 | 379 | 12/13/2022 |
1.2.2022.1115 | 603 | 11/15/2022 |
1.2.2022.1111 | 454 | 11/11/2022 |
1.2.2022.1018 | 572 | 10/18/2022 |
1.2.2022.901 | 677 | 9/1/2022 |
1.2.2022.822 | 505 | 8/22/2022 |
1.2.2022.720 | 821 | 7/20/2022 |
1.1.2022.720 | 537 | 7/20/2022 |