使用python-memcached==1.48
终端:
memcached -I 10m
Python:
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import memcache
>>> mc = memcache.Client(['127.0.0.1:11211'], debug=0)
>>> print(mc.set('test', ''.join(['a' for x in xrange(1*1024*1024+1)])))
0
>>> print(mc.set('test', ''.join(['a' for x in xrange(1*1024*1024)])))
True
有人可以复制吗?