方法总是返回false,不知道问题出在哪里:
var myObj = new MyObj("Key01","My Value ");
bool isInserted = memCache.Store(Enyim.Caching.Memcached.StoreMode.Add, myObj.Id, myObj.name , new TimeSpan(0, 10, 0));
我的文件 app.config:(指向 Amazon ElastiCache)
<configuration>
<configSections>
<sectionGroup name="enyim.com">
<section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<enyim.com>
<memcached>
<servers>
<!-- put your own server(s) here-->
<add address="memCashed.*****.0015.usw2.cache.amazonaws.com" port="11211" />
</servers>
<socketPool minPoolSize="100" maxPoolSize="1000" connectionTimeout="00:10:10" deadTimeout="00:02:00" />
</memcached>
</enyim.com>
</configuration>