I'm trying to distribute cache across multiple servers. I have installed Memcached on 2 Linux servers. I'm using .Net Client Libraries to manipulate cache on those servers.
It's always store value on the first server from configuration. I tried to change sequence of the servers and it stores but only on the first in the list.
I use Putty to check if object exist on the server.
The questions are:
How to store object on both servers at the same time?
if I want to verify that this object stored on all servers from configuration file
How I can do it from client libraries?
Here is the example of my code:
static void Main(string[] args)
{
var mc = new MemcachedClient();
mc.FlushAll();
mc.Store(StoreMode.Add, "key1", "some information");
Console.WriteLine(mc.Get("key1"));
}
and configuration
<enyim.com>
<memcached>
<servers>
<add address="20.23.24.105" port="11211"/>
<add address="20.23.24.106" port="11211"/>
</servers>
<socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:10:00" deadTimeout="00:02:00"/>
</memcached>
</enyim.com>