ThrottlingTroll.CounterStores.DistributedCache 8.0.0

dotnet add package ThrottlingTroll.CounterStores.DistributedCache --version 8.0.0
                    
NuGet\Install-Package ThrottlingTroll.CounterStores.DistributedCache -Version 8.0.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="ThrottlingTroll.CounterStores.DistributedCache" Version="8.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ThrottlingTroll.CounterStores.DistributedCache" Version="8.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ThrottlingTroll.CounterStores.DistributedCache" />
                    
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 ThrottlingTroll.CounterStores.DistributedCache --version 8.0.0
                    
#r "nuget: ThrottlingTroll.CounterStores.DistributedCache, 8.0.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 ThrottlingTroll.CounterStores.DistributedCache@8.0.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=ThrottlingTroll.CounterStores.DistributedCache&version=8.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ThrottlingTroll.CounterStores.DistributedCache&version=8.0.0
                    
Install as a Cake Tool

ThrottlingTroll.CounterStores.DistributedCache

ICounterStore implementation that uses ASP.NET Core's IDistributedCache.

Fast, but not entirely consistent (because IDistributedCache does not provide atomic operations). In other words, your computing instances might go slightly on their own. For true consistency consider using ThrottlingTroll.CounterStores.Redis instead.

<img alt="Nuget" src="https://img.shields.io/nuget/dt/ThrottlingTroll.CounterStores.DistributedCache?label=ThrottlingTroll.CounterStores.DistributedCache%20downloads">

How to use

  1. Install package from NuGet:

    dotnet add package ThrottlingTroll.CounterStores.DistributedCache
    
  2. Configure an IDistributedCache option of your choice as described here.

  3. EITHER put DistributedCacheCounterStore instance into your DI container:

    builder.Services.AddSingleton<ICounterStore>(provider =>
        new DistributedCacheCounterStore(provider.GetRequiredService<IDistributedCache>())
    );
    

    OR provide an instance of it via .UseThrottlingTroll() method:

    app.UseThrottlingTroll(options => {
        options.CounterStore = new DistributedCacheCounterStore(app.Services.GetRequiredService<IDistributedCache>());
    });
    
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 was computed.  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
8.0.0 183 7/1/2025
8.0.0-beta3 159 6/30/2025
8.0.0-beta2 166 6/29/2025
8.0.0-beta1 115 6/28/2025
7.3.0 1,233 10/14/2024
7.2.0 327 8/31/2024
7.2.0-beta1 137 8/31/2024
7.1.2 187 6/12/2024
7.1.1 147 6/3/2024
7.1.0 176 6/1/2024
7.1.0-beta1 127 6/1/2024
7.0.0 179 5/15/2024
7.0.0-beta2 141 5/10/2024
7.0.0-beta1 151 5/5/2024
6.1.2 177 4/5/2024
6.1.0 175 1/28/2024
6.0.0 226 12/4/2023
6.0.0-beta6 172 11/26/2023
6.0.0-beta5 163 11/26/2023
6.0.0-beta4 174 11/26/2023
6.0.0-beta3 148 11/26/2023
6.0.0-beta2 171 11/26/2023
6.0.0-beta1 160 11/25/2023
5.0.0 1,527 11/2/2023
4.0.5 283 8/27/2023
4.0.4 242 7/22/2023
1.0.0-preview1 242 7/22/2023