VOOZH about

URL: https://www.nuget.org/packages/EnyimMemcachedCore/

⇱ NuGet Gallery | EnyimMemcachedCore 3.5.1




EnyimMemcachedCore 3.5.1

dotnet add package EnyimMemcachedCore --version 3.5.1
 
 
NuGet\Install-Package EnyimMemcachedCore -Version 3.5.1
 
 
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="EnyimMemcachedCore" Version="3.5.1" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EnyimMemcachedCore" Version="3.5.1" />
 
Directory.Packages.props
<PackageReference Include="EnyimMemcachedCore" />
 
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 EnyimMemcachedCore --version 3.5.1
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EnyimMemcachedCore, 3.5.1"
 
 
#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 EnyimMemcachedCore@3.5.1
 
 
#: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=EnyimMemcachedCore&version=3.5.1
 
Install as a Cake Addin
#tool nuget:?package=EnyimMemcachedCore&version=3.5.1
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Enyim Memcached Client

This is a memcached client library for .NET migrated from EnyimMemcached.

Configure

The appsettings.json Without Authentication

{
 "enyimMemcached": {
 "Servers": [
 {
 "Address": "memcached",
 "Port": 11211
 }
 ],
 "Transcoder": "MessagePackTranscoder"
 }
}
The appsettings.json With Authentication
{
 "enyimMemcached": {
 "Servers": [
 {
 "Address": "memcached",
 "Port": 11211
 }
 ],
 "Authentication": {
 "Type": "Enyim.Caching.Memcached.PlainTextAuthenticator",
 "Parameters": {
 "zone": "",
 "userName": "username",
 "password": "password"
 }
 }
 }
}

Startup.cs

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();
 }
}

Example usage

Use IMemcachedClient interface

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);
 }
}

Use IDistributedCache interface

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (51)

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

GitHub repositories (6)

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
Loading failed