![]() |
VOOZH | about |
dotnet add package EasyMemoryCache --version 3.1.3
NuGet\Install-Package EasyMemoryCache -Version 3.1.3
<PackageReference Include="EasyMemoryCache" Version="3.1.3" />
<PackageVersion Include="EasyMemoryCache" Version="3.1.3" />Directory.Packages.props
<PackageReference Include="EasyMemoryCache" />Project file
paket add EasyMemoryCache --version 3.1.3
#r "nuget: EasyMemoryCache, 3.1.3"
#:package EasyMemoryCache@3.1.3
#addin nuget:?package=EasyMemoryCache&version=3.1.3Install as a Cake Addin
#tool nuget:?package=EasyMemoryCache&version=3.1.3Install as a Cake Tool
Open Package Manager Console and run:
Install-Package EasyMemoryCache
First, register the component in your Application:
.AddEasyCache(new CacheSettings() { ... })
//setup our DI
var serviceProvider = new ServiceCollection()
.AddEasyCache(new CacheSettings() { ... })
.BuildServiceProvider();
var caching = serviceProvider.GetService<ICaching>();
return caching;
services.AddEasyCache(Configuration.GetSection("CacheSettings").Get<CacheSettings>());
"CacheSettings": {
"CacheProvider": "Redis",
"IsDistributed": true,
"RedisConnectionString": "localhost:6379,password=xxx=,ssl=False,abortConnect=False"
}
For MemoryCache
"IsDistributed": false,
"CacheProvider": "MemoryCache",
InMemory cache will be used instead of Redis
private readonly ICaching _caching;
private string UserKeyCache => "UserKey";
public UserService(ICaching caching)
{
_caching = caching;
}
var lstStringFromAsync = await _caching.GetOrSetObjectFromCacheAsync(CacheKeyNameForAsync, 20, ReturnListOfStringAsync);
var lstStringFromAsync = await _caching.GetOrSetObjectFromCacheAsync(CacheKeyNameForAsync, 20, () => ReturnListOfStringAsync(param));
var lstString = _caching.GetOrSetObjectFromCache(CacheKeyName, 20, ReturnListOfString);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on EasyMemoryCache:
| Package | Downloads |
|---|---|
|
AlertHawk.Monitoring.Domain
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.1.3 | 98 | 5/29/2026 |
| 3.1.2 | 227 | 5/1/2026 |
| 3.1.1 | 169 | 4/4/2026 |
| 3.0.7 | 211 | 3/21/2026 |
| 3.0.6 | 853 | 1/21/2026 |
| 3.0.5 | 1,697 | 11/13/2025 |
| 3.0.4 | 4,133 | 6/5/2025 |
| 3.0.3 | 654 | 4/22/2025 |
| 3.0.2 | 3,717 | 12/21/2024 |
| 3.0.1 | 425 | 12/3/2024 |
| 3.0.0 | 787 | 11/19/2024 |
| 2.0.9 | 1,774 | 10/13/2024 |
| 2.0.8 | 1,690 | 9/13/2024 |
| 2.0.7 | 1,480 | 8/21/2024 |
| 2.0.6 | 338 | 8/12/2024 |
| 2.0.5 | 611 | 7/30/2024 |
| 2.0.4 | 2,118 | 6/21/2024 |
| 2.0.3 | 1,737 | 4/11/2024 |
| 2.0.2 | 1,975 | 2/7/2024 |
| 2.0.1 | 1,123 | 1/15/2024 |
.NET 10 support