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

咨询一下目前的存储上限逻辑? #111

Closed
wenkangzhou opened this issue Jun 30, 2017 · 6 comments
Closed

咨询一下目前的存储上限逻辑? #111

wenkangzhou opened this issue Jun 30, 2017 · 6 comments

Comments

@wenkangzhou
Copy link

目前看文档是1000条数据自动循环,但这样还是可能爆掉,因为localstorage上限是5M,AsyncStorage好像也只有6M,是否有一个机制是判断容量上限,删除过期时间临近的数据?另外判断的时机是什么时候?

@sunnylqm
Copy link
Owner

sunnylqm commented Jun 30, 2017

localStorage的上限是5m,但是AsyncStorage应该没有明确上限(由硬件容量和操作系统决定)
目前没有别的机制防爆,后期可能考虑加入字符串长度的统计

@sunnylqm sunnylqm closed this as completed Aug 2, 2017
@NewStartMe
Copy link

爆掉 有什么后果呢?所有数据都会丢失 还是只有超过上限的数据存储不上?

@sunnylqm
Copy link
Owner

会抛出异常无法写入

@NewStartMe
Copy link

喔…...... 其实我想知道的是 是不是如果我设置size 为2000就可以存储2000条数据了

@sunnylqm
Copy link
Owner

@NewStartMe 我这里只管条数,至于你一条一个字还是一条一个T,我这里都管不着。

@NewStartMe
Copy link

@sunnylqm 好的 非常感谢您的回答

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

3 participants