相关问题:
1. 设置最大占用内存后好像没起作用。
-m tells memcached how much RAM to use for item storage (in megabytes). Note carefully that this isn't a global memory limit, so memcached will use a few % more memory than you tell it to. Set this to safe values. Setting it to less than 48 megabytes does not work properly in 1.4.x and earlier. It will still use the memory.
转自:http://stackoverflow.com/questions/6112324/memcached-using-more-than-max-memory
参考:https://code.google.com/p/memcached/wiki/NewConfiguringServer
2. 在同一个程序集里将一个值放入到memcache里,马上去时可以取到,但是在另一个程序集里取的时候取不到,或者telnet也拿不到值。
可能问题及解决办法:
a. 存储的值序列化后不同类型,则需要将其更新为同一类型,建议使用同一的常见类型,如string,int等,放入string可以拼成一个xml字符串,然后到使用的时候在做解析
b. 很有可能是memcache池已经满了,可以设置