我还没有找到很多关于如何从 c# 中使用 AWS Elasticache 的体面示例。
http://jacace.wordpress.com/2013/02/24/using-the-amazon-elasticache-in-c/建议了我正在尝试的 BeIT 库。
到目前为止,这是我的代码:
string memCachedUrl = "mycache.xxxxxx.cfg.use1.cache.amazonaws.com:11211";
MemcachedClient.Setup("mycache", new string[] { memCachedUrl });
MemcachedClient cache = MemcachedClient.GetInstance("mycache");
aData n = new aData();
cache.Set("aData",1234);
我得到的错误是:
29/05/2013 9:52:19 AM ERROR BeIT.MemCached.SocketPool - Error connecting to: 54.
243.16.75
The operation completed successfully
at BeIT.MemCached.PooledSocket..ctor(SocketPool socketPool, IPEndPoint endPoint, Int32 endReceiveTimeout, Int32 connectTimeout) in l:\Projects\BeITMemcached
\ClientLibrary\PooledSocket.cs:line 63
at BeIT.MemCached.SocketPool.Acquire() in l:\Projects\BeITMemcached\ClientLibrary\SocketPool.cs:line 151
我究竟做错了什么?任何地方都有好的示例 c# 代码吗?
更新
我试图从 AWS 外部调用它 - 显然这是不可能的