Soenneker.Dictionaries.AsyncLazy 3.0.52

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Dictionaries.AsyncLazy

A thread-safe dictionary that lazily initializes values asynchronously with automatic disposal

A high-performance asynchronous lazy-loading dictionary in C#, designed to ensure only one factory execution per key while supporting concurrent access.

Installation

dotnet add package Soenneker.Dictionaries.AsyncLazy

Usage

Basic Example

var dictionary = new AsyncLazyDictionary<string, string>();

string result = await dictionary.Get("greeting", async () => {
    await Task.Delay(1000, token); // Simulate data fetching
    return "Hello, World!";
});

Console.WriteLine(result); // "Hello, World!"

Removing an Entry

await dictionary.Remove("greeting");

Proper Disposal

await dictionary.DisposeAsync();
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
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
3.0.57 0 an hour ago
3.0.56 0 2 hours ago
3.0.55 0 6 hours ago
3.0.54 44 2 days ago
3.0.53 48 2 days ago
3.0.52 444 6 days ago
3.0.51 445 6 days ago
3.0.50 90 10 days ago
3.0.49 107 11 days ago
3.0.48 125 13 days ago
3.0.47 126 14 days ago
3.0.46 51 17 days ago
3.0.45 50 17 days ago
3.0.44 64 17 days ago
3.0.43 139 19 days ago
3.0.42 139 20 days ago
3.0.41 139 20 days ago
3.0.40 138 20 days ago
3.0.39 157 20 days ago
3.0.38 155 20 days ago
3.0.37 156 20 days ago
3.0.36 144 20 days ago
3.0.35 143 20 days ago
3.0.34 196 24 days ago
3.0.33 191 25 days ago
3.0.32 76 a month ago
3.0.31 81 a month ago
3.0.30 84 a month ago
3.0.29 85 a month ago
3.0.28 87 a month ago
3.0.27 78 a month ago
3.0.26 85 a month ago
3.0.25 83 a month ago
3.0.24 85 a month ago
3.0.23 79 a month ago
3.0.22 78 a month ago
3.0.21 77 a month ago
3.0.20 79 a month ago
3.0.19 79 a month ago
3.0.18 93 a month ago
3.0.17 76 a month ago
3.0.16 83 a month ago
3.0.15 85 a month ago
3.0.14 94 a month ago
3.0.13 84 a month ago
3.0.12 87 a month ago
3.0.11 80 a month ago
3.0.10 90 a month ago
3.0.9 86 a month ago
3.0.8 90 a month ago
3.0.7 97 a month ago
3.0.6 94 a month ago
3.0.5 92 a month ago
3.0.4 91 a month ago
3.0.3 90 a month ago
3.0.2 98 a month ago
3.0.1 98 a month ago