Closed zew13 closed 11 years ago
http://sae.sina.com.cn/?m=devcenter&catId=199 这里文档 set(key, val, time=0, min_compress_len=0) 设置key的值为val,成功则返回True
time 该key的超时时间,请参阅memcached协议Storage commands: http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt
min_compress_len 启用zlib.compress压缩val的最小长度,如果val的长度大于此值 则启用压缩,0表示不压缩。
这里文档 http://python.sinaapp.com/doc/service.html class sae.kvdb.KVClient(debug=0)¶ KVDB客户端基于python-memcached,大多数method使用方法相同。 如果不能成功创建KVClient,则抛出 sae.kvdb.Error 异常。
debug 是否输出详细调试、错误信息到日志,默认关闭
set(key, val, min_compress_len=0) 设置key的值为val,成功则返回True
文档不统一
问题 , KVClient到底有没有time参数, time参数生效吗(过期后会自动删除key)?
KVClient没有time参数,文档中心的文档有点旧了。
文档中心的文档已经更新。
文档中心的文档会定期的更新,有时可能会和http://python.sinaapp.com这里的不一致,http://python.sinaapp.com的文档是每天自动从github的源码build出来的。
http://sae.sina.com.cn/?m=devcenter&catId=199 这里文档 set(key, val, time=0, min_compress_len=0) 设置key的值为val,成功则返回True
time 该key的超时时间,请参阅memcached协议Storage commands: http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt
min_compress_len 启用zlib.compress压缩val的最小长度,如果val的长度大于此值 则启用压缩,0表示不压缩。
这里文档 http://python.sinaapp.com/doc/service.html class sae.kvdb.KVClient(debug=0)¶ KVDB客户端基于python-memcached,大多数method使用方法相同。 如果不能成功创建KVClient,则抛出 sae.kvdb.Error 异常。
debug 是否输出详细调试、错误信息到日志,默认关闭
set(key, val, min_compress_len=0) 设置key的值为val,成功则返回True
min_compress_len 启用zlib.compress压缩val的最小长度,如果val的长度大于此值 则启用压缩,0表示不压缩。
文档不统一
问题 , KVClient到底有没有time参数, time参数生效吗(过期后会自动删除key)?