Bsft.Caching.EventAggregator 2.2.0

dotnet add package Bsft.Caching.EventAggregator --version 2.2.0
                    
NuGet\Install-Package Bsft.Caching.EventAggregator -Version 2.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bsft.Caching.EventAggregator" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bsft.Caching.EventAggregator" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Bsft.Caching.EventAggregator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bsft.Caching.EventAggregator --version 2.2.0
                    
#r "nuget: Bsft.Caching.EventAggregator, 2.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bsft.Caching.EventAggregator@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bsft.Caching.EventAggregator&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Bsft.Caching.EventAggregator&version=2.2.0
                    
Install as a Cake Tool

Bsft.Caching.EventAggregator

The adapter between the Bsft.Caching and Bsft.EventAggregator families: a hosted subscriber that evicts cached query results when an invalidation event is published in-process, so a write handler can invalidate without taking a reference on the cache.

Install

dotnet add package Bsft.Caching.EventAggregator

Requires Bsft.Caching and Bsft.EventAggregator, both of which must already be registered — this package supplies no cache and no aggregator of its own.

Register

services.AddBsftCaching();
services.AddBsftEventAggregator();
services.AddBsftCacheInvalidation();

Nothing else is required. Publish CacheKeyInvalidatedEvent or CacheTagInvalidatedEvent through IEventAggregator and the subscriber calls ICacheInvalidator for you. The subscriber is an IHostedService, so it only runs where a host runs it.

Configure

Option Default Effect
— — The package has no options type: what it registers is a single subscriber with nothing to tune. What gets evicted is decided by the event, and how far the eviction reaches is decided by BsftCachingOptions and by which ICacheTagIndex is registered.

Validation: none — there is nothing to configure.

Extend

None. The two events are the surface: publish one and the eviction happens. Replace ICacheInvalidator in Bsft.Caching to change what an eviction does, and ICacheTagIndex to change how far a tag invalidation reaches — an in-process index bounds it to this instance, which is the trap worth knowing about before wiring this up on a distributed cache.

Documentation

Topic page: docs/caching.md. Conventions: docs/package-conventions.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 54 10/23/2026
2.1.0 113 9/28/2026