public IMemcachedClient Create(IMemcachedSettings memcachedSettings) { var mcConfig = new MemcachedClientConfiguration(); foreach (var server in memcachedSettings.Server) mcConfig.AddServer(server.Item1, server.Item2); mcConfig.Protocol = MemcachedProtocol.Text; return new MemcachedClient(mcConfig); }
public IMemcached Create(IMemcachedSettings memcachedSettings) { return new Memcached(memcachedSettings,_memcachedClientFactory); }
public Memcached(IMemcachedSettings memcachedSettings, IMemcachedClientFactory memcachedClientFactory) { _memcacheSettings = memcachedSettings; _memcachedClient = memcachedClientFactory.Create(memcachedSettings); }