Ir al contenido

Buscar en el Ecosistema EricksonLopez.*

Escribe el nombre de una librería, ID de paquete NuGet, tipo .NET o concepto arquitectónico para buscar en el portal.

EricksonLopez.Caching — Visión General

EricksonLopez.Caching (1.0.0 en NuGet, L2) ofrece caché componible L1 en memoria, L2 en Redis, híbrida y particionada por inquilino integrada directamente con EricksonLopez.Result.

  • Semántica explícita: ICacheProvider devuelve Task<Result<T>> / Task<Result<bool>> sin confundir ausencias en caché con fallos de transporte.
  • Protección single-flight contra stampede: GetOrCreateAsync coordina llamadas concurrentes a la fábrica por clave para proteger las bases de datos.
  • Respaldo fail-safe: FailSafeMaxStale sirve valores obsoletos controlados cuando falla la fábrica (HybridCacheProvider y MemoryCacheProvider).
  • Invalidación por etiquetas y prefijos: ITaggedCacheProvider expone RemoveByTagAsync y RemoveByTagsAsync además de 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
Pipeline de Búsqueda Híbrida L1 + L2Las peticiones consultan primero MemoryCacheProvider L1, recurren a RedisCacheProvider L2 ante un fallo L1 y ejecutan la fábrica con coordinación single-flight ante fallo L2.
Ver descripción textual y tabla accesible

Las peticiones consultan primero MemoryCacheProvider L1, recurren a RedisCacheProvider L2 ante un fallo L1 y ejecutan la fábrica con coordinación single-flight ante fallo L2.

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

Ambos paquetes están publicados en 1.0.0 en NuGet (733 descargas totales; localVersion: 2.0.0 sin publicar en disco), orientados a net8.0;net9.0;net10.0 y con estado AOT Full (IsAotCompatible=true, EnableTrimAnalyzer=true):

  • EricksonLopez.Caching (597 descargas) — ICacheProvider, MemoryCacheProvider, HybridCacheProvider, TenantPartitionedCacheProvider, SystemTextJsonCacheSerializer.
  • EricksonLopez.Caching.Redis (136 descargas) — RedisCacheProvider, RedisCacheOptions, AddRedisCaching.

Estado de Benchmarks: hasBenchmarks: false — no existen reportes BenchmarkDotNet.Artifacts en dotnet-caching, por lo que no se publican cifras de latencia ni asignaciones.