Framework-agnostic contracts and safe-off NoOp implementations for the PowerCSharp Cache feature.
- Targets
netstandard2.0andnet8.0, so cache providers can run on .NET Framework and .NET Core. - No ASP.NET Core dependency.
- Only dependency is
Microsoft.Extensions.Logging.Abstractions(required for theILoggerparameter on NoOp services).
ICacheService— in-memory cache abstraction (withGetOrCreatestampede-safe helpers).ICacheStore— low-level cache store abstraction.IDiskCacheService— asynchronous disk-backed cache abstraction.CacheProvider— backend selector enum.CacheResult<T>/CacheResultReason— operation result model.CacheEntryMetadata,InMemoryCacheEntryMetadata,DiskCacheEntryMetadata,CacheFileKind— metadata types.NoOpCacheService/NoOpDiskCacheService— safe-off floors so dependents always resolve.
This package uses three namespaces; import the ones you need:
using PowerCSharp.Feature.Cache.Abstractions; // ICacheService, IDiskCacheService, CacheResult<T>, metadata
using PowerCSharp.Feature.Cache.Abstractions.Enums; // CacheProvider, CacheResultReason, CacheEntryPriority
using PowerCSharp.Feature.Cache.Abstractions.NoOp; // NoOpCacheService, NoOpDiskCacheService
CacheProvideris not in the rootPowerCSharp.Feature.Cache.Abstractionsnamespace; it is in the.Enumssub-namespace.
PowerCSharp.Feature.Cache.BitFaster— in-memory provider.PowerCSharp.Feature.Cache.Disk— disk-backed LRU provider.
The ASP.NET feature-module wiring lives in PowerCSharp.Feature.Cache.
- Package ID:
PowerCSharp.Feature.Cache.Abstractions - Depends on:
Microsoft.Extensions.Logging.Abstractions - Target frameworks:
netstandard2.0andnet8.0