We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String ip = "<IP>"; int port = 11211; String user = "cacheuser"; String password = "12345"; InetSocketAddress inetSocketAddress = new InetSocketAddress(ip, port); XMemcachedClientBuilder memcachedClientBuilder = new XMemcachedClientBuilder(Arrays.asList(inetSocketAddress)); memcachedClientBuilder.setConnectionPoolSize(3); memcachedClientBuilder.setCommandFactory(new BinaryCommandFactory()); memcachedClientBuilder.setAuthInfoMap(Collections.singletonMap(inetSocketAddress, AuthInfo.plain(user, password))); MemcachedClient memcachedClient = memcachedClientBuilder.build(); memcachedClient.set("aaa", 86400, "12345"); String a2 = memcachedClient.get("aaa"); System.out.println(a2);
192.168.1.5 cache1
代码<IP>直接使用使用ip:192.168.1.5时会验证失败,使用cache1正常
<IP>
192.168.1.5
cache1
192.168.1.5 cache1 192.168.1.5 cache2
代码<IP>使用别名: cache2会验证失败,使用cache1正常
cache2
出错代码 AuthMemcachedConnectListener 内的
AuthInfo authInfo = authInfoMap.get(AddrUtil.getServerString(tcpSession.getRemoteSocketAddress()));
取到null
The text was updated successfully, but these errors were encountered:
No branches or pull requests
192.168.1.5 cache1
代码
<IP>
直接使用使用ip:192.168.1.5
时会验证失败,使用cache1
正常代码
<IP>
使用别名:cache2
会验证失败,使用cache1
正常出错代码 AuthMemcachedConnectListener
内的
取到null
The text was updated successfully, but these errors were encountered: