CyberEye.Caching.Lib
3.0.34
dotnet add package CyberEye.Caching.Lib --version 3.0.34
NuGet\Install-Package CyberEye.Caching.Lib -Version 3.0.34
<PackageReference Include="CyberEye.Caching.Lib" Version="3.0.34" />
<PackageVersion Include="CyberEye.Caching.Lib" Version="3.0.34" />
<PackageReference Include="CyberEye.Caching.Lib" />
paket add CyberEye.Caching.Lib --version 3.0.34
#r "nuget: CyberEye.Caching.Lib, 3.0.34"
#:package CyberEye.Caching.Lib@3.0.34
#addin nuget:?package=CyberEye.Caching.Lib&version=3.0.34
#tool nuget:?package=CyberEye.Caching.Lib&version=3.0.34
CyberEye.Caching.Lib
Các helper thao tác cache qua IDistributedCache và lớp bảo vệ Circuit Breaker. Provider được host đăng ký; giá trị memcache trong Core là bộ nhớ trong tiến trình, không phải server Memcached.
Target framework: net8.0.
Cài đặt
dotnet add package CyberEye.Caching.Lib
Cần cấu hình NuGet feed của dự án và chọn phiên bản tương thích với các package CyberEye khác trong host.
API sử dụng
Inject Ce.Caching.Lib.Interfaces.ICachingHelper. Interface có TryGetFromCacheAsync, TrySetCacheAsync, RemoveCacheAsync và các thao tác theo pattern.
// Fragment trong phương thức async; cache là ICachingHelper đã được host đăng ký.
await cache.TrySetCacheAsync("catalog:version", "v1", second: 60, ct: ct);
Đăng ký tại host
Nếu dùng Ce.Common.Lib, extension AddCaching(configuration) nằm trong Ce.Common.Lib.StartupExtensions; tránh gọi lại khi hosting module đã đăng ký.
{
"Cache": {
"UseCache": true,
"Type": "redis",
"Host": "redis",
"Port": "6379"
}
}
Không dùng section CacheConfig/RedisOptions trong ví dụ này. Host cần kết nối Redis thực và cấu hình timeout/CircuitBreaker phù hợp. Đừng giả định mọi provider hỗ trợ cùng thao tác quét/xóa key.
| 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. 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. |
-
net8.0
- CyberEye.CommonCaching.Lib (>= 3.0.34)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CyberEye.Caching.Lib:
| Package | Downloads |
|---|---|
|
CyberEye.Common.Lib
Package chứa các hàm tiện ích, các base class, abstract class |
|
|
CyberEye.Elasticsearch.Lib
Package cung cấp CRUD tương tác với NoSql Elasticsearch |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.34 | 0 | 11/15/2026 |
| 3.0.33 | 0 | 11/15/2026 |
| 3.0.32 | 0 | 11/15/2026 |
| 3.0.31 | 41 | 11/15/2026 |
| 3.0.30 | 50 | 11/15/2026 |
| 3.0.29 | 50 | 11/13/2026 |
| 3.0.28 | 145 | 11/6/2026 |
| 3.0.27 | 148 | 9/17/2026 |
| 3.0.26 | 163 | 9/8/2026 |
| 3.0.25 | 185 | 8/22/2026 |
| 3.0.24 | 173 | 8/10/2026 |
| 3.0.23 | 165 | 8/9/2026 |
| 3.0.22 | 216 | 8/1/2026 |
| 3.0.21 | 166 | 7/28/2026 |
| 3.0.20 | 199 | 7/27/2026 |
| 3.0.19 | 185 | 7/27/2026 |
| 3.0.18 | 182 | 7/17/2026 |
| 3.0.17 | 186 | 7/13/2026 |
| 3.0.16 | 176 | 7/12/2026 |
| 3.0.15 | 173 | 7/10/2026 |