Foundatio.DataProtection
13.0.0-beta1
Prefix Reserved
This is a prerelease version of Foundatio.DataProtection.
dotnet add package Foundatio.DataProtection --version 13.0.0-beta1
NuGet\Install-Package Foundatio.DataProtection -Version 13.0.0-beta1
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="Foundatio.DataProtection" Version="13.0.0-beta1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Foundatio.DataProtection" Version="13.0.0-beta1" />
<PackageReference Include="Foundatio.DataProtection" />
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 Foundatio.DataProtection --version 13.0.0-beta1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Foundatio.DataProtection, 13.0.0-beta1"
#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 Foundatio.DataProtection@13.0.0-beta1
#: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=Foundatio.DataProtection&version=13.0.0-beta1&prerelease
#tool nuget:?package=Foundatio.DataProtection&version=13.0.0-beta1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Pluggable foundation blocks for building loosely coupled distributed apps.
โจ Why Choose Foundatio?
- ๐ Pluggable implementations - Swap Redis, Azure, AWS, or in-memory with no code changes
- ๐งช Developer friendly - In-memory implementations for fast local development and testing
- ๐ DI native - Built for Microsoft.Extensions.DependencyInjection
- ๐ฏ Interface-first - Code against abstractions, not implementations
- โก Production ready - Battle-tested in high-scale applications
- ๐ Consistent APIs - Same patterns across caching, queues, storage, and more
๐งฑ Core Building Blocks
| Feature | Description |
|---|---|
| Caching | In-memory, Redis, and hybrid caching with automatic invalidation |
| Queues | Reliable message queuing with Redis, Azure, AWS SQS |
| Locks | Distributed locking and throttling |
| Messaging | Pub/sub with Redis, RabbitMQ, Kafka, Azure Service Bus |
| Jobs | Background job processing with queue integration |
| File Storage | Unified file API for disk, S3, Azure Blob, and more |
| Resilience | Retry policies, circuit breakers, and timeouts |
๐ Quick Start
dotnet add package Foundatio
// Caching
ICacheClient cache = new InMemoryCacheClient();
await cache.SetAsync("user:123", user, TimeSpan.FromMinutes(5));
var cached = await cache.GetAsync<User>("user:123");
// Queuing
IQueue<WorkItem> queue = new InMemoryQueue<WorkItem>();
await queue.EnqueueAsync(new WorkItem { Data = "Hello" });
var entry = await queue.DequeueAsync();
// File Storage
IFileStorage storage = new InMemoryFileStorage();
await storage.SaveFileAsync("docs/readme.txt", "Hello World");
// Distributed Locks
ILockProvider locker = new CacheLockProvider(cache, messageBus);
await using var handle = await locker.AcquireAsync("resource-key");
๐ฆ Provider Implementations
| Provider | Caching | Queues | Messaging | Storage | Locks |
|---|---|---|---|---|---|
| In-Memory | โ | โ | โ | โ | โ |
| Redis | โ | โ | โ | โ | โ |
| Azure Storage | โ | โ | |||
| Azure Service Bus | โ | โ | |||
| AWS (S3/SQS) | โ | โ | |||
| RabbitMQ | โ | ||||
| Kafka | โ | ||||
| Minio | โ | ||||
| Aliyun | โ | ||||
| SFTP | โ |
๐ Learn More
Core Features
- Getting Started - Installation and setup
- Caching - In-memory, Redis, and hybrid caching with invalidation
- Queues - FIFO message delivery with lock renewal and retry policies
- Locks - Distributed locking with null handling patterns
- Messaging - Pub/sub with size limits and notification patterns
- File Storage - Unified file API across providers
- Jobs - Background job processing and hosted service integration
Advanced Topics
- Resilience - Retry policies, circuit breakers, and timeouts
- Serialization - Serializer configuration and performance
- Dependency Injection - DI setup and patterns
- Configuration - Options and settings
๐ฆ CI Packages (Feedz)
Want the latest CI build before it hits NuGet? Add the Feedz source and install the pre-release version:
dotnet nuget add source https://f.feedz.io/foundatio/foundatio/nuget -n foundatio-feedz
dotnet add package Foundatio --prerelease
Or add to your NuGet.config:
<configuration>
<packageSources>
<add key="foundatio-feedz" value="https://f.feedz.io/foundatio/foundatio/nuget" />
</packageSources>
<packageSourceMapping>
<packageSource key="foundatio-feedz">
<package pattern="Foundatio.*" />
</packageSource>
</packageSourceMapping>
</configuration>
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. See our documentation for development guidelines.
Development Setup:
- Clone the repository
- Open
Foundatio.slnxin Visual Studio or VS Code - Run
dotnet buildto build - Run
dotnet testto run tests
๐ Related Projects
- Foundatio.Mediator - Blazingly fast, convention-based C# mediator powered by source generators
๐ License
Apache 2.0 License
Thanks to all the people who have contributed
| Product | Versions 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 is compatible. 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.
-
net10.0
- Foundatio (>= 13.0.0-beta1)
- Microsoft.AspNetCore.DataProtection (>= 8.0.0)
-
net8.0
- Foundatio (>= 13.0.0-beta1)
- Microsoft.AspNetCore.DataProtection (>= 8.0.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 |
|---|---|---|
| 13.0.0-beta1 | 87 | 1/12/2026 |
| 12.0.0 | 4,935 | 8/20/2025 |
| 11.1.0 | 183 | 5/9/2025 |
| 11.0.8 | 195 | 1/31/2025 |
| 11.0.7 | 187 | 1/31/2025 |
| 11.0.6 | 202 | 11/26/2024 |
| 11.0.5 | 219 | 9/27/2024 |
| 11.0.4 | 197 | 9/27/2024 |
| 11.0.3 | 213 | 9/16/2024 |
| 11.0.2 | 206 | 8/31/2024 |
| 11.0.1 | 189 | 8/31/2024 |
| 11.0.0 | 189 | 8/30/2024 |
| 10.7.1 | 12,047 | 3/27/2024 |
| 10.7.0 | 1,904 | 1/5/2024 |
| 10.6.1 | 1,318 | 6/23/2023 |
| 10.6.0 | 8,236 | 1/1/2023 |
| 10.5.0 | 1,211 | 5/18/2022 |
| 10.4.0 | 1,743 | 3/7/2022 |
| 10.3.1 | 633 | 1/20/2022 |
| 10.3.0 | 608 | 1/20/2022 |
| 10.2.5 | 655 | 12/7/2021 |
| 10.2.4 | 888 | 12/3/2021 |
| 10.2.3 | 449 | 11/22/2021 |
| 10.2.2 | 1,493 | 9/23/2021 |
| 10.2.1 | 1,061 | 7/19/2021 |
| 10.2.0 | 481 | 7/8/2021 |
| 10.1.4 | 563 | 6/16/2021 |
| 10.1.3 | 1,301 | 4/23/2021 |
| 10.1.2 | 510 | 4/23/2021 |
| 10.1.1 | 612 | 4/15/2021 |
| 10.1.0 | 516 | 4/13/2021 |
| 10.0.2 | 1,019 | 1/20/2021 |
| 10.0.1 | 1,357 | 11/2/2020 |
| 10.0.0 | 894 | 9/16/2020 |
| 10.0.0-beta9 | 780 | 8/25/2020 |
| 10.0.0-beta8 | 518 | 8/3/2020 |
| 10.0.0-beta7 | 525 | 7/29/2020 |
| 10.0.0-beta6 | 908 | 7/7/2020 |
| 10.0.0-beta5 | 669 | 6/20/2020 |
| 10.0.0-beta3 | 500 | 6/14/2020 |
| 10.0.0-beta2 | 580 | 6/6/2020 |
| 10.0.0-beta10 | 567 | 9/15/2020 |
| 10.0.0-beta1 | 546 | 5/26/2020 |
| 10.0.0-alpha3 | 510 | 5/5/2020 |
| 10.0.0-alpha2 | 517 | 4/27/2020 |
| 9.1.1 | 771 | 4/28/2020 |
| 9.1.0 | 641 | 4/28/2020 |