Tingle.Extensions.Caching.MongoDB
4.11.2
See the version list below for details.
dotnet add package Tingle.Extensions.Caching.MongoDB --version 4.11.2
NuGet\Install-Package Tingle.Extensions.Caching.MongoDB -Version 4.11.2
<PackageReference Include="Tingle.Extensions.Caching.MongoDB" Version="4.11.2" />
paket add Tingle.Extensions.Caching.MongoDB --version 4.11.2
#r "nuget: Tingle.Extensions.Caching.MongoDB, 4.11.2"
// Install Tingle.Extensions.Caching.MongoDB as a Cake Addin #addin nuget:?package=Tingle.Extensions.Caching.MongoDB&version=4.11.2 // Install Tingle.Extensions.Caching.MongoDB as a Cake Tool #tool nuget:?package=Tingle.Extensions.Caching.MongoDB&version=4.11.2
Tingle.Extensions.Caching.MongoDB
This package contains an implementation of IDistributedCache
using MongoDB that can also be leveraged in ASP.NET Core as a Session State Provider.
This implementation is highly inspired by CosmosCache.
MongoClient initialization
The implementation provides two distinct options:
Use an existing instance of a MongoClient
This option will make the provider reuse an existing MongoClient
instance, which won't be disposed when the provider is disposed.
services.AddMongoCache((MongoCacheOptions cacheOptions) =>
{
cacheOptions.CollectionName = Configuration["MongoCacheCollection"];
cacheOptions.DatabaseName = Configuration["MongoCacheDatabase"];
cacheOptions.MongoClient = existingMongoClient;
cacheOptions.CreateIfNotExists = true;
});
Use a defined connection string
This option will make the provider maintain an internal instance of MongoClient
that will get disposed when the provider is disposed. The MongoClient
will be created using the provided ConnectionString
.
services.AddMongoCache((MongoCacheOptions cacheOptions) =>
{
cacheOptions.CollectionName = Configuration["MongoCacheCollection"];
cacheOptions.DatabaseName = Configuration["MongoCacheDatabase"];
cacheOptions.ConnectionString = Configuration["MongoConnectionString"];
cacheOptions.CreateIfNotExists = true;
});
State storage
The provider stores the state in a collection within a database, both parameters are required within the MongoCacheOptions
initialization. An optional parameter, CreateIfNotExists
will make sure to create the collection if it does not exist with an optimized configuration for key-value storage.
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 is compatible. 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 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. |
.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 (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
- MongoDB.Driver (>= 2.27.0)
-
net7.0
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
- MongoDB.Driver (>= 2.27.0)
-
net8.0
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.2)
- MongoDB.Driver (>= 2.27.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 |
---|---|---|
5.0.0 | 82 | 11/19/2024 |
4.14.1 | 661 | 10/14/2024 |
4.14.0 | 511 | 9/16/2024 |
4.13.0 | 2,138 | 8/13/2024 |
4.12.0 | 760 | 8/7/2024 |
4.11.2 | 2,563 | 7/15/2024 |
4.11.1 | 829 | 6/26/2024 |
4.11.0 | 1,525 | 6/6/2024 |
4.10.1 | 101 | 6/5/2024 |
4.10.0 | 316 | 5/27/2024 |
4.9.0 | 301 | 5/16/2024 |
4.8.0 | 374 | 5/5/2024 |
4.7.0 | 1,065 | 3/25/2024 |
4.6.0 | 571 | 3/8/2024 |
4.5.0 | 2,401 | 11/22/2023 |
4.4.1 | 292 | 11/20/2023 |
4.4.0 | 235 | 11/15/2023 |
4.3.0 | 682 | 10/18/2023 |
4.2.2 | 808 | 9/20/2023 |
4.2.1 | 1,521 | 8/4/2023 |
4.2.0 | 1,897 | 5/31/2023 |
4.1.1 | 317 | 5/26/2023 |
4.1.0 | 350 | 5/22/2023 |
4.0.0 | 1,256 | 3/14/2023 |
3.8.1 | 12,039 | 11/30/2022 |
3.8.0 | 458 | 11/21/2022 |
3.7.0 | 12,091 | 9/4/2022 |
3.6.0 | 1,189 | 7/4/2022 |
3.5.3 | 1,435 | 4/8/2022 |
3.5.2 | 1,068 | 1/7/2022 |
3.5.1 | 848 | 11/11/2021 |
3.5.0 | 469 | 11/10/2021 |
3.4.7 | 586 | 11/2/2021 |
3.4.6 | 442 | 10/29/2021 |
3.4.5 | 750 | 10/9/2021 |
3.4.4 | 437 | 9/25/2021 |