DaLi.Utils.Redis
3.24.12.2101
dotnet add package DaLi.Utils.Redis --version 3.24.12.2101
NuGet\Install-Package DaLi.Utils.Redis -Version 3.24.12.2101
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="DaLi.Utils.Redis" Version="3.24.12.2101" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DaLi.Utils.Redis --version 3.24.12.2101
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DaLi.Utils.Redis, 3.24.12.2101"
#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.
// Install DaLi.Utils.Redis as a Cake Addin #addin nuget:?package=DaLi.Utils.Redis&version=3.24.12.2101 // Install DaLi.Utils.Redis as a Cake Tool #tool nuget:?package=DaLi.Utils.Redis&version=3.24.12.2101
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DaLi.Utils.Redis
基于 FreeRedis 的 Redis 工具库,提供了更易用的 Redis 数据操作接口。
功能特性
- 支持 Redis JSON 模块,提供对象化的 JSON 数据操作
- 支持 Redis Hash 表操作
- 提供基于 Redis 的索引功能
- 支持标签索引
- 支持字典数据索引
- 支持状态缓存操作
- 支持大小写敏感/不敏感设置
依赖要求
- .NET 8.0+
- Redis 服务器需安装 RedisJSON 模块
快速开始
- 安装 NuGet 包:
dotnet add package DaLi.Utils.Redis
- 基本用法示例:
' 创建 Redis 客户端
Dim client As New RedisClient("localhost:6379")
' JSON 操作
Dim json As New RedisJson(client, "test-json")
json.Set("$.name", "test")
json.Get(Of String)("$.name") ' 返回 "test"
' Hash 表操作
Dim hash As New RedisHash(Of String)(client, "test-hash")
hash("key") = "value"
hash.Get("key") ' 返回 "value"
' 标签索引
Class TagIndex
Inherits TagIndexBase(Of Entity, Integer)
Protected Overrides Function GetID(entity As Entity) As Integer
Return entity.Id
End Function
Protected Overrides Function GetTags(entity As Entity) As String()
Return entity.Tags
End Function
End Class
' 状态缓存
Dim cache As New StatusCache(Of String)(client, "test-status")
cache.SET("key", "value")
主要类说明
RedisJson
- Redis JSON 数据操作RedisHash
- Redis Hash 表操作IndexBase
- 索引基类TagIndexBase
- 标签索引基类DictionaryIndexBase
- 字典数据索引基类StatusCache
- 状态缓存操作
许可证
本项目基于 Mulan PSL v2 开源协议。
关于
由湖南大沥网络科技有限公司开发和维护。
- 作者: 木炭(WOODCOAL)
- 邮箱: i@woodcoal.cn
- 主页: http://www.hunandali.com/
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- DaLi.Utils.Core (>= 3.24.12.2101)
- FreeRedis (>= 1.3.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DaLi.Utils.Redis:
Package | Downloads |
---|---|
DaLi.Utils.App
.Net 常用基础公共库 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.24.12.2101 | 98 | 12/20/2024 |
3.24.11.2612 | 119 | 11/26/2024 |
3.24.8.1909 | 179 | 8/19/2024 |
3.24.8.617 | 129 | 8/6/2024 |
3.24.8.210 | 114 | 8/2/2024 |
3.24.8.122 | 129 | 8/1/2024 |
3.24.7.2315 | 162 | 7/23/2024 |
3.24.7.1621 | 154 | 7/16/2024 |
3.24.7.1516 | 149 | 7/15/2024 |