Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[问题]空间占用问题 #6

Closed
guileen opened this issue Sep 13, 2013 · 1 comment
Closed

[问题]空间占用问题 #6

guileen opened this issue Sep 13, 2013 · 1 comment

Comments

@guileen
Copy link
Contributor

guileen commented Sep 13, 2013

这个项目非常的酷,我非常喜欢,从年初开始使用。

看到最近增加了hash,set,list,等功能。此前我使用的是将一个object用msgpack后,然后存储为一个kv类型的值,然后在取出时,再decode。

现在有了hash,set,list之后,我的代码可以简化,但是不知道hash、set、list的空间占用是怎样计算的?

@KDr2
Copy link
Owner

KDr2 commented Oct 17, 2013

@guileen key会大一些,这些集合的实现方式就是给key加上这样一个 prefix: [collection_type(不可见字符)][collection_name], 另外会多几个kv来保存集合的信息(size, head, tail等)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants