Skip to main content

Shared cache contracts for the Koan framework: policies, builders, serializers, and capability descriptors.

Total Downloads
24.4K
24,370
Published
Sep 10, 2026
1mo ago

Get Started

dotnet add package Sylin.Koan.Cache.Abstractions --version 1.0.21
ProductVersions
.NET
net10.0

README

Sylin.Koan.Cache.Abstractions

Contracts for Koan Cache policies, entry builders, values, stores, and capability negotiation. Reference this package when implementing a Cache provider or a module that describes cache intent without activating the Cache runtime.

Install

dotnet add package Sylin.Koan.Cache.Abstractions

Applications normally install Sylin.Koan.Cache or a functional adapter instead.

Meaningful result

public sealed class AcmeCacheStore : ICacheStore
{
    public string Name => "acme";
    public CacheStorePlacement Placement => CacheStorePlacement.Remote;

    public void Describe(ICapabilities caps)
        => caps.Add(CacheCaps.Tags)
            .Add(CacheCaps.BinaryPayload);

    // Implement Fetch, Set, Remove, Touch, Exists, and EnumerateByTag.
}

Register the provider through standard .NET DI as IEnumerable<ICacheStore>:

services.TryAddEnumerable(
    ServiceDescriptor.Singleton<ICacheStore, AcmeCacheStore>());

Use [ProviderPriority] only when automatic election should prefer this store over another candidate in the same placement. Cache compiles election once; registration order never decides.

Guarantees and boundaries

  • This package contains no KoanModule; referencing it alone performs no registration or I/O.
  • CacheStorePlacement describes topology. CacheCaps describes provider guarantees. A provider name implies neither.
  • Declare only capabilities the implementation actually honors. Runtime operations fail loudly when a selected provider cannot satisfy the requested semantic.
  • AllowStaleFor means bounded stale serving; it does not imply background revalidation.
  • Policy tier is application intent. Host-wide provider election belongs to Sylin.Koan.Cache.

See TECHNICAL.md for provider-author rules.

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.The published metadata declares 14 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.