Skip to content

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.

EricksonLopez.Caching Overview

EricksonLopez.Caching (1.0.0 on NuGet, L2) provides composable L1 in-memory, L2 Redis, hybrid, and tenant-partitioned caching integrated directly with EricksonLopez.Result.

  • Explicit outcome semantics: ICacheProvider operations return Task<Result<T>> / Task<Result<bool>> rather than conflating cache misses with backend transport failures.
  • Single-flight stampede protection: GetOrCreateAsync coordinates concurrent factory calls per key so downstream databases are not overwhelmed on cold or expired keys.
  • Fail-safe stale serving: FailSafeMaxStale serves stale values when factory execution fails transiently (HybridCacheProvider and MemoryCacheProvider).
  • Tag & prefix invalidation: ITaggedCacheProvider supports RemoveByTagAsync and RemoveByTagsAsync alongside RemoveByPrefixAsync.
flowchart LR
Caller["Caller"] --> H["HybridCacheProvider"]
H --> L1["L1 MemoryCacheProvider"]
L1 -- Hit --> Caller
L1 -- Miss --> L2["L2 RedisCacheProvider"]
L2 -- Hit --> L1
L2 -- Miss --> F["Factory (Single-Flight)"]
F --> L2
Hybrid L1 + L2 Cache Lookup PipelineRequests check the local MemoryCacheProvider first, fall back to RedisCacheProvider on L1 miss, and execute the factory under single-flight coordination on L2 miss.
View accessible text summary and structure

Requests check the local MemoryCacheProvider first, fall back to RedisCacheProvider on L1 miss, and execute the factory under single-flight coordination on L2 miss.

flowchart LR
Caller["Caller"] --> H["HybridCacheProvider"]
H --> L1["L1 MemoryCacheProvider"]
L1 -- Hit --> Caller
L1 -- Miss --> L2["L2 RedisCacheProvider"]
L2 -- Hit --> L1
L2 -- Miss --> F["Factory (Single-Flight)"]
F --> L2

Both packages are published at 1.0.0 on NuGet (733 total downloads; localVersion: 2.0.0 unreleased on disk). Both target net8.0;net9.0;net10.0 and achieve Full AOT status (IsAotCompatible=true, EnableTrimAnalyzer=true):

Package NuGet (1.0.0) Local HEAD AOT Status TFMs Role
EricksonLopez.Caching Published (597 dl) 2.0.0 Full net8.0;net9.0;net10.0 ICacheProvider, MemoryCacheProvider, HybridCacheProvider, TenantPartitionedCacheProvider, SystemTextJsonCacheSerializer
EricksonLopez.Caching.Redis Published (136 dl) 2.0.0 Full net8.0;net9.0;net10.0 RedisCacheProvider, RedisCacheOptions, AddRedisCaching

Benchmark Status: hasBenchmarks: false — zero BenchmarkDotNet.Artifacts reports exist in dotnet-caching, so no throughput or latency numbers are claimed here.