Nefarius.AspNetCore.MongoDbCache
2.6.2
Prefix Reserved
dotnet add package Nefarius.AspNetCore.MongoDbCache --version 2.6.2
NuGet\Install-Package Nefarius.AspNetCore.MongoDbCache -Version 2.6.2
<PackageReference Include="Nefarius.AspNetCore.MongoDbCache" Version="2.6.2" />
<PackageVersion Include="Nefarius.AspNetCore.MongoDbCache" Version="2.6.2" />
<PackageReference Include="Nefarius.AspNetCore.MongoDbCache" />
paket add Nefarius.AspNetCore.MongoDbCache --version 2.6.2
#r "nuget: Nefarius.AspNetCore.MongoDbCache, 2.6.2"
#:package Nefarius.AspNetCore.MongoDbCache@2.6.2
#addin nuget:?package=Nefarius.AspNetCore.MongoDbCache&version=2.6.2
#tool nuget:?package=Nefarius.AspNetCore.MongoDbCache&version=2.6.2
Nefarius.AspNetCore.MongoDbCache
A distributed cache implementation using MongoDb.
How do I get started?
Install the nuget package
PM> Install-Package Nefarius.AspNetCore.MongoDbCache
You can either choose to use the provided extension method or register the implementation in the ConfigureServices method. The mongo connection settings can be passed as either a connection string or MongoClientSettings object.
public void ConfigureServices(IServiceCollection services)
{
services.AddMongoDbCache(options =>
{
options.ConnectionString = "mongodb://localhost:27017";
options.DatabaseName = "MongoCache";
options.CollectionName = "appcache";
options.ExpiredScanInterval = TimeSpan.FromMinutes(10);
});
}
public void ConfigureServices(IServiceCollection services)
{
var mongoSettings = new MongoClientSettings();
services.AddMongoDbCache(options =>
{
options.MongoClientSettings = mongoSettings;
options.DatabaseName = "MongoCache";
options.CollectionName = "appcache";
options.ExpiredScanInterval = TimeSpan.FromMinutes(10);
});
}
MongoDbCache implements IDistributedCache, therefore, you can use all the sync and async methods provided by the interface, please see https://docs.microsoft.com/en-us/aspnet/core/performance/caching/distributed.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.9)
- Microsoft.Extensions.Options (>= 9.0.9)
- MongoDB.Driver (>= 3.5.0)
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.6.2 | 129 | 9/23/2025 |
2.6.1 | 278 | 9/18/2025 |
2.6.0 | 150 | 2/6/2025 |
2.6.0-pre002 | 120 | 2/5/2025 |
2.6.0-pre001 | 106 | 2/5/2025 |