Liwendong.Frameworks.Data
1.6.0
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
.NET Framework 4.5.1
This package targets .NET Framework 4.5.1. The package is compatible with this framework or higher.
dotnet add package Liwendong.Frameworks.Data --version 1.6.0
NuGet\Install-Package Liwendong.Frameworks.Data -Version 1.6.0
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="Liwendong.Frameworks.Data" Version="1.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Liwendong.Frameworks.Data" Version="1.6.0" />
<PackageReference Include="Liwendong.Frameworks.Data" />
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 Liwendong.Frameworks.Data --version 1.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Liwendong.Frameworks.Data, 1.6.0"
#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 Liwendong.Frameworks.Data@1.6.0
#: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=Liwendong.Frameworks.Data&version=1.6.0
#tool nuget:?package=Liwendong.Frameworks.Data&version=1.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Liwendong.Frameworks.Data
Liwendong 框架数据层。
数据访问封装与 SQL 执行帮助类。
安装
dotnet add package Liwendong.Frameworks.Data
说明
- 本包属于 LiwendongPackages 组件集合。
- 具体目标框架与依赖请参阅本包
.csproj文件。
缓存移除(DataCacheHelper)
与具体 ORM 无关的通用实体缓存移除,SqlSugar、Dapper 等数据层均可复用:
List<string> RemoveEntityCache<T>(T info, ICacheHelper cache = null):移除单个实体关联的缓存(实体需实现IBaseEntitys)。List<string> RemoveEntityCache<T>(List<T> list, ICacheHelper cache = null):批量移除实体关联的缓存。List<string> RemoveCacheKeys(IEnumerable<string> cacheNames, ICacheHelper cache = null):按缓存 Key 移除,Key 尾部为.或:时按前缀泛删。
约定:
- 返回值是未能移除的 Key 集合(含被安全校验拒绝的前缀),空集合代表全部成功;方法本身不抛异常,缓存删除失败不会打断已提交的数据写操作。
cache缺省取站点缓存CacheHepler.SiteCache,可传入具体实现用于测试或多缓存库场景。- 前缀泛删有防护:前缀含
*?[]或去掉尾部分隔符后长度不足 3(如":"、"a.")会被拒绝并记 Warn 日志,避免误删整个缓存库。 - 精确 Key 先走一次批量
Remove,批量失败再回退逐个删除,隔离单个 Key 的失败。 - MemoryCache 档下移除只作用于当前进程,多进程/多机部署需使用 Redis 缓存,否则其他进程只能等 Key 过期。
版本历史
1.6.0 (2026-11-23)
- 新增:
DataCacheHelper通用缓存移除能力,从Liwendong.Frameworks.Data.SqlSugarExtend的SugarHandler.RemoveCache中提取,供 SqlSugar / Dapper 等各 ORM 数据层共用。 - 新增:移除结果可诊断(返回未移除的 Key 集合)、日志携带具体 Key 上下文、支持注入
ICacheHelper与IEnumerable<string>Key 集合。 - 优化:精确 Key 改为一次批量删除、失败再回退逐个删除,减少 Redis 往返。
- 安全:前缀泛删增加最短前缀长度与 Glob 元字符校验,防止业务实体返回裸分隔符时删掉整个缓存库(过短前缀由原先的"泛删全库"变为"跳过并告警")。
| 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 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. 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. |
| .NET Framework | net451 is compatible. net452 was computed. net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 is compatible. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- Liwendong.Frameworks (>= 1.8.1)
- Microsoft.Data.SqlClient (>= 5.2.3)
-
.NETFramework 4.5.1
- Liwendong.Frameworks (>= 1.8.1)
-
.NETFramework 4.6
- Liwendong.Frameworks (>= 1.8.1)
-
.NETFramework 4.7
- Liwendong.Frameworks (>= 1.8.1)
-
.NETFramework 4.8
- Liwendong.Frameworks (>= 1.8.1)
-
net8.0
- Liwendong.Frameworks (>= 1.8.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Liwendong.Frameworks.Data:
| Package | Downloads |
|---|---|
|
Liwendong.Frameworks.Data.SqlSugarExtend
SqlSugar辅助操作 |
GitHub repositories
This package is not used by any popular GitHub repositories.