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

MMKV allKeys return expired results #1096

Closed
calvin2021y opened this issue Jun 17, 2023 · 4 comments
Closed

MMKV allKeys return expired results #1096

calvin2021y opened this issue Jun 17, 2023 · 4 comments

Comments

@calvin2021y
Copy link

The version of MMKV

1.3.0

What's the issue?

MMKV allKeys will return expired results, test on linux(guess other platform has same problem).

@lingol
Copy link
Collaborator

lingol commented Jun 17, 2023

Yes. It's a known issue. The problem is that to filter an expired key we will have to check the key's value. And that is a lot of memory operation or even disk IO operation for allKeys().

@lingol
Copy link
Collaborator

lingol commented Jun 17, 2023

The same problem also goes with count().

@lingol
Copy link
Collaborator

lingol commented Jun 20, 2023

It's supported in dev branch. You can try it out. Keep in mind that it comes with costs.

@Tencent Tencent deleted a comment from google-mirror Jul 11, 2023
@lingol
Copy link
Collaborator

lingol commented Aug 11, 2023

It's supported in v1.3.1.

@lingol lingol closed this as completed Aug 11, 2023
mrousavy pushed a commit to mrousavy/MMKV that referenced this issue Sep 4, 2023
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