Memcached as Distributed Cache in .Net Core Application

preview_player
Показать описание
Memcached is a distributed in-memory cache, which can be used to significantly increase performance of your application.
In this video, I show how to install Memched in a docker container and use it in a .NET Core application.

Couple of clarifications:
1. The reason Microsoft.Extensions.Logging is needed, because AddEnyimMemcached method internally expects ILogger from the IoC container.
2. The Set cache method, expiry is in seconds and not in minutes, as I might have shown in the video.

Рекомендации по теме
Комментарии
Автор

Hey, very nice explanation of using it in dot net core apps. In my scenario Memcached is scaled over multiple nodes/servers, MemCached itself sets the value by default to all the nodes.
However, how can i remove the key value pair from all the servers. IMemcachedClient dependecy doesn't have that flexibility.
FlushAll will remove all keys from all nodes, i am looking for removing specific key from all nodes.

akshayy
Автор

Hi, thank you for a nice video but actually it doesn't work for me, I can't read from cache and I see such errors in my logs
'Failed to create socket. 127.0.0.1:11211', 'Failed to CreateSocketAsync to 127.0.0.1:11211'

gagik