Liwendong.CacheExtend
1.5.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.CacheExtend --version 1.5.0
NuGet\Install-Package Liwendong.CacheExtend -Version 1.5.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.CacheExtend" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Liwendong.CacheExtend" Version="1.5.0" />
<PackageReference Include="Liwendong.CacheExtend" />
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.CacheExtend --version 1.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Liwendong.CacheExtend, 1.5.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.CacheExtend@1.5.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.CacheExtend&version=1.5.0
#tool nuget:?package=Liwendong.CacheExtend&version=1.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Liwendong.CacheExtend
缓存扩展类
更新日志
1.4.0 (2026-10-10)
- 新增:net8.0、net47 目标框架支持,TFM 为 net8.0;netcoreapp3.1;net451;net46;net47;net48
- 优化:net8.0 分支显式引用 Microsoft.AspNetCore.Http 2.2.2 及 Microsoft.Extensions.Caching.Memory/Configuration 8.0.x
1.3.1 (2026-10-09)
- 修复:RequestCacheHelper.Set(key,value,seconds) 无限递归导致StackOverflow
- 修复:RequestCacheHelper netcore分支存取key不一致导致永久miss
- 修复:RequestCacheHelper.Get<T> 缺key时抛KeyNotFoundException
- 修复:RequestCacheHelper.RemoveByPattern/RemoveAll 枚举中删除导致InvalidOperationException
- 修复:RequestCacheHelper.Remove(string) 双重前缀导致删除失效
- 优化:MemoryCacheHelper 移除Set后多余的Exists回读
- 优化:MemoryCacheHelper 异步方法改用Task.FromResult,移除假异步
- 优化:MemoryCacheHelper GetAllKeys 使用反射获取Keys属性
1.3.0
- 修复.NET CORE MemoryCache 读取所有Keys的问题
版本历史
1.5.0 (2026-10-20)
- 新增:
ICacheHelperExtensions.Get(key, acquire)single-flight 回源锁——缓存过期瞬间同一 key 的并发请求按 key 串行回源(进程内),避免并发击穿(典型场景:微信 access_token 并发刷新有封号风险)。跨进程防击穿需调用方使用分布式锁(如 Frameworks.CacheExtend.LockHelper) - 优化:
ICacheHelper.RemoveAll补充共享 Redis 误删警告文档(各 Redis 实现为数据库级清空,非按应用/前缀隔离)
1.4.1 (2026-10-17)
- 修复:
Get<T>类型不符时返回默认值(不再抛 InvalidCastException);GetKeysByPattern正则转义不全导致含元字符时抛异常、RequestCacheHelper 返回带前缀键导致 Remove 删不掉的问题 - 优化:cache-aside 改单次 Get 判定(消除 Exists+Get 竞态),空结果写短 TTL 占位标记防缓存穿透;滑动/绝对过期 TimeSpan.Zero 统一视为不启用;ICacheHelperExtensions 文件转 UTF-8
| 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
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.Extensions.Caching.Memory (>= 3.1.1)
- Microsoft.Extensions.Configuration (>= 3.1.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 3.1.1)
- Microsoft.Extensions.Configuration.Binder (>= 3.1.1)
- Microsoft.Extensions.Configuration.Json (>= 3.1.1)
-
.NETFramework 4.5.1
- No dependencies.
-
.NETFramework 4.6
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
net8.0
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.1)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Liwendong.CacheExtend:
| Package | Downloads |
|---|---|
|
Liwendong.Frameworks
基础框架 |
|
|
Liwendong.CacheExtend.CSRedis
CSRedis缓存管理 |
|
|
Liwendong.Wexin.MP.SDK
微信公众号辅助SDK |
|
|
Liwendong.JwtAuthorize
JWT辅助文件 |
|
|
Liwendong.CacheExtend.ServiceStackRedis
ServiceStackRedis缓存管理 |
GitHub repositories
This package is not used by any popular GitHub repositories.