![]() |
VOOZH | about |
dotnet add package EnyimMemcachedCore --version 3.5.1
NuGet\Install-Package EnyimMemcachedCore -Version 3.5.1
<PackageReference Include="EnyimMemcachedCore" Version="3.5.1" />
<PackageVersion Include="EnyimMemcachedCore" Version="3.5.1" />Directory.Packages.props
<PackageReference Include="EnyimMemcachedCore" />Project file
paket add EnyimMemcachedCore --version 3.5.1
#r "nuget: EnyimMemcachedCore, 3.5.1"
#:package EnyimMemcachedCore@3.5.1
#addin nuget:?package=EnyimMemcachedCore&version=3.5.1Install as a Cake Addin
#tool nuget:?package=EnyimMemcachedCore&version=3.5.1Install as a Cake Tool
This is a memcached client library for .NET migrated from EnyimMemcached.
{
"enyimMemcached": {
"Servers": [
{
"Address": "memcached",
"Port": 11211
}
],
"Transcoder": "MessagePackTranscoder"
}
}
{
"enyimMemcached": {
"Servers": [
{
"Address": "memcached",
"Port": 11211
}
],
"Authentication": {
"Type": "Enyim.Caching.Memcached.PlainTextAuthenticator",
"Parameters": {
"zone": "",
"userName": "username",
"password": "password"
}
}
}
}
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddEnyimMemcached();
// services.AddEnyimMemcached("enyimMemcached");
// services.AddEnyimMemcached(Configuration);
// services.AddEnyimMemcached(Configuration, "enyimMemcached");
// services.AddEnyimMemcached(Configuration.GetSection("enyimMemcached"));
// services.AddEnyimMemcached(options => options.AddServer("memcached", 11211));
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseEnyimMemcached();
}
}
public class HomeController : Controller
{
private readonly IMemcachedClient _memcachedClient;
private readonly IBlogPostService _blogPostService;
public HomeController(IMemcachedClient memcachedClient, IBlogPostService blogPostService)
{
_memcachedClient = memcachedClient;
_blogPostService = blogPostService;
}
public async Task<IActionResult> Index()
{
var cacheKey = "blogposts-recent";
var cacheSeconds = 600;
var posts = await _memcachedClient.GetValueOrCreateAsync(
cacheKey,
cacheSeconds,
async () => await _blogPostService.GetRecent(10));
return Ok(posts);
}
}
public class CreativeService
{
private ICreativeRepository _creativeRepository;
private IDistributedCache _cache;
public CreativeService(
ICreativeRepository creativeRepository,
IDistributedCache cache)
{
_creativeRepository = creativeRepository;
_cache = cache;
}
public async Task<IList<CreativeDTO>> GetCreatives(string unitName)
{
var cacheKey = $"creatives_{unitName}";
IList<CreativeDTO> creatives = null;
var creativesJson = await _cache.GetStringAsync(cacheKey);
if (creativesJson == null)
{
creatives = await _creativeRepository.GetCreatives(unitName)
.ProjectTo<CreativeDTO>().ToListAsync();
var json = string.Empty;
if (creatives != null && creatives.Count() > 0)
{
json = JsonConvert.SerializeObject(creatives);
}
await _cache.SetStringAsync(
cacheKey,
json,
new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromMinutes(5)));
}
else
{
creatives = JsonConvert.DeserializeObject<List<CreativeDTO>>(creativesJson);
}
return creatives;
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. 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. |
| .NET Framework | net48 net48 is compatible. net481 net481 is compatible. |
Showing the top 5 NuGet packages that depend on EnyimMemcachedCore:
| Package | Downloads |
|---|---|
|
EasyCaching.Memcached
A simple distributed caching provider based on EnyimMemcachedCore. |
|
|
Senparc.CO2NET.Cache.Memcached
WeChat Public Account - Memcached Module Senparc.CO2NET SDK Open Source Project: https://github.com/JeffreySu/WeiXinMPSDK |
|
|
EDQ.WMS.Infrastructrue
Package Description |
|
|
GeneXus.Memcached.Core
Package Description |
|
|
Zicard.API.Common
Bases microservices da Zicard API |
Showing the top 6 popular GitHub repositories that depend on EnyimMemcachedCore:
| Repository | Stars |
|---|---|
|
dotnetcore/EasyCaching
:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
|
|
|
Cysharp/MasterMemory
Source Generator based Embedded Typed Readonly In-Memory Document Database for .NET and Unity.
|
|
|
Senparc/Senparc.CO2NET
Base Common Library, support for.NET Framework &.NET Core
|
|
|
grissomlau/jimu
.netcore micro service framework
|
|
|
catcherwong/Demos
:100:Some demos for learning
|
|
|
newrelic/newrelic-dotnet-agent
The New Relic .NET language agent.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.5.1 | 12,778 | 5/15/2026 |
| 3.5.0 | 35,513 | 4/7/2026 |
| 3.4.7 | 8,699 | 3/19/2026 |
| 3.4.6 | 52,407 | 2/23/2026 |
| 3.4.5 | 266,837 | 9/9/2025 |
| 3.4.4 | 31,828 | 8/10/2025 |
| 3.4.3 | 2,057 | 8/10/2025 |
| 3.4.2 | 1,681 | 8/10/2025 |
| 3.4.1 | 11,120 | 8/4/2025 |
| 3.4.0 | 268,669 | 5/18/2025 |
| 3.3.3-pre2 | 2,117 | 1/24/2025 |
| 3.3.3-pre1 | 228 | 1/24/2025 |
| 3.3.2 | 392,611 | 12/19/2024 |
| 3.3.1 | 34,931 | 12/9/2024 |
| 3.3.0 | 197,142 | 11/23/2024 |
| 3.2.4 | 185,308 | 10/27/2024 |
| 3.2.3 | 511,761 | 9/2/2024 |
| 3.2.2 | 144,065 | 7/31/2024 |