Conceptos Fundamentales — Proveedores, Fail-Safe y Etiquetas
L2StableNuGet: v1.0.0Local HEAD: v2.0.0AOT: Full
EricksonLopez.Caching modela las operaciones de caché como contratos explícitos Result<T> con duración acotada y aislamiento por inquilino.
ICacheProvider: ExponeGetAsync<T>,GetManyAsync<T>,GetOrCreateAsync<T>,SetAsync<T>,SetManyAsync<T>,RemoveAsync,RemoveManyAsync,RemoveByPrefixAsync,ExistsAsync,ExpireAsyncyRefreshAsync.ITaggedCacheProvider: ExtiendeICacheProviderconRemoveByTagAsyncyRemoveByTagsAsyncpara invalidación lógica transversal.
CacheEntryOptions y HybridCacheEntryOptions
Sección titulada «CacheEntryOptions y HybridCacheEntryOptions»CacheEntryOptionsofreceFromAbsolute,FromSlidingyFromAbsoluteWithFailSafejunto conTags.CacheEntryOptions.MaxAllowedDurationestá fijado enTimeSpan.FromDays(3650)en el código fuente (CacheEntryOptions.cs:15), por encima de la nota de 365 días en el changelog inicial.HybridCacheEntryOptionsañadeLocalCacheDuration,DistributedCacheDurationyHybridCacheEntryOptions.FromDurations(local, distributed).
Aislamiento por Inquilino y Serialización Native AOT
Sección titulada «Aislamiento por Inquilino y Serialización Native AOT»AddTenantPartitionedCache(services, sp => tenantResolver(sp))aísla las claves por partición de inquilino.- En compilaciones Native AOT, pasa un
JsonSerializerContextgenerado en compilación (JsonSerializerOptions) aSystemTextJsonCacheSerializeren lugar deSystemTextJsonCacheSerializer.Default.