Net.Cache.DynamoDb 1.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Net.Cache.DynamoDb --version 1.2.1
                    
NuGet\Install-Package Net.Cache.DynamoDb -Version 1.2.1
                    
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="Net.Cache.DynamoDb" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Net.Cache.DynamoDb" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Net.Cache.DynamoDb" />
                    
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 Net.Cache.DynamoDb --version 1.2.1
                    
#r "nuget: Net.Cache.DynamoDb, 1.2.1"
                    
#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 Net.Cache.DynamoDb@1.2.1
                    
#: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=Net.Cache.DynamoDb&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Net.Cache.DynamoDb&version=1.2.1
                    
Install as a Cake Tool

Net.Cache.DynamoDb

Overview

Net.Cache.DynamoDb extends the capabilities of the Net.Cache library by integrating with Amazon DynamoDB. This integration allows for the use of DynamoDB as a distributed, scalable, and highly available backend for caching operations.

Features

  • DynamoDB Integration: Leverages Amazon DynamoDB for storing and retrieving cache data.
  • Easy Configuration: Offers various initialization methods for the DynamoDB client.
  • Seamless Compatibility: Fully compatible with the Net.Cache library, providing DynamoDB as a storage option.

Getting Started

Installation

Install Net.Cache.DynamoDb via NuGet along with Net.Cache

Defining DynamoDB Models

To use DynamoDbStorageProvider, you need to define models representing your DynamoDB tables:

using Amazon.DynamoDBv2.DataModel;

[DynamoDBTable("MyTableName")]
public class MyTable
{
    [DynamoDBHashKey] // Partition key
    public string Id { get; set; }

    [DynamoDBProperty("MyCustomNameIfNeeded")] // Optional custom property name
    public string SomeProperty { get; set; }

    // Other properties as needed
}

Usage

Initializing DynamoDbStorageProvider

Create an instance of DynamoDbStorageProvider<TKey, TValue> using one of the following methods:

  1. Default Initialization:
var dynamoDbProvider = new DynamoDbStorageProvider<int, MyTable>();
  1. Custom DynamoDB Client:
var customClient = new AmazonDynamoDBClient(...);
var dynamoDbProvider = new DynamoDbStorageProvider<int, MyTable>(customClient);
  1. Custom DynamoDB Context:
var customContext = new DynamoDBContext(customClient);
var dynamoDbProvider = new DynamoDbStorageProvider<int, MyTable>(customContext);
Integrating with Net.Cache
var cache = new CacheProvider<int, MyTable>(dynamoDbProvider);
Storing and Retrieving Data
// Store a value
cache.Store(1, new MyTable { Id = "1", SomeProperty = "Value" });

// Retrieve a value
if (cache.TryGetValue(1, out var myTableInstance)) {
    // Use myTableInstance
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Net.Cache.DynamoDb:

Package Downloads
Net.Cache.DynamoDb.ERC20

A specialized extension of `Net.Cache.DynamoDb` package, for caching ERC20 token information in Amazon DynamoDB.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 612 9/25/2025
2.0.1 309 9/24/2025
2.0.0 282 8/8/2025
1.3.10 1,039 7/22/2025
1.3.9 533 7/21/2025
1.3.7 242 7/16/2025
1.3.6 221 7/16/2025
1.3.5 2,393 8/20/2024
1.3.4 415 7/10/2024
1.3.1 1,550 3/20/2024
1.3.0 1,877 3/19/2024
1.2.2 1,674 2/9/2024
1.2.1 1,813 2/8/2024
1.2.0 242 2/7/2024
1.1.0 208 1/15/2024
1.0.0 346 12/4/2023

- Catch and throw AmazonDynamoDBException exception.

Full changes can found here: https://github.com/The-Poolz/Net.Cache/releases/tag/v1.2.1