TonWinPkg.Extensions.Caching.Dapr 1.0.2-alpha

This is a prerelease version of TonWinPkg.Extensions.Caching.Dapr.
dotnet add package TonWinPkg.Extensions.Caching.Dapr --version 1.0.2-alpha
                    
NuGet\Install-Package TonWinPkg.Extensions.Caching.Dapr -Version 1.0.2-alpha
                    
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="TonWinPkg.Extensions.Caching.Dapr" Version="1.0.2-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TonWinPkg.Extensions.Caching.Dapr" Version="1.0.2-alpha" />
                    
Directory.Packages.props
<PackageReference Include="TonWinPkg.Extensions.Caching.Dapr" />
                    
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 TonWinPkg.Extensions.Caching.Dapr --version 1.0.2-alpha
                    
#r "nuget: TonWinPkg.Extensions.Caching.Dapr, 1.0.2-alpha"
                    
#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 TonWinPkg.Extensions.Caching.Dapr@1.0.2-alpha
                    
#: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=TonWinPkg.Extensions.Caching.Dapr&version=1.0.2-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TonWinPkg.Extensions.Caching.Dapr&version=1.0.2-alpha&prerelease
                    
Install as a Cake Tool

TonWinPkg.Extensions.Caching.Dapr

Introduction

This package serves as an implementation of Microsoft.Extension.Caching.Abstractions, providing caching functionality through Dapr's state store component.

Warning

It is advised to consider this package solely as a transitional solution for the following reasons:

  1. Dapr's state management building block does not implement sliding expiration time. The sliding expiration time implemented by this package is achieved by adding fields to the cached values. Thus, you need to ensure that all read and write operations on the cache are handled through this library.
  2. Dapr only supports caching data in JSON format and does not support byte arrays. Therefore, this package utilizes Base64 decoding and encoding when reading and writing cache data, resulting in unnecessary performance overhead.

Recommendation

It is recommended to use this library only for feasibility testing of integrating your project with Dapr and not advisable for use in production environments. If you intend to use Dapr for caching operations in a production environment, it is recommended not to use Microsoft.Extensions.Caching.Abstractions.

Running Tests

Before running, make sure you have initialized Dapr and your state store component is named statestore.

Run the following command in the test directory:

dapr run --app-id myapp --dapr-http-port 3500 dotnet test

License

This project is licensed under the terms of the MIT license.


Note: In this document, "Dapr" refers to "Distributed Application Runtime," an open-source project supported by Microsoft.

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

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
1.0.2-alpha 94 4/13/2024
1.0.1-alpha 76 4/10/2024