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

The enableKeyExpire function and the expireDuration parameter are missing #615

Open
davistsin opened this issue Dec 12, 2023 · 4 comments
Open

Comments

@davistsin
Copy link

MMKV provide function (Global Expiration)

// expire in a day
mmkv.enableAutoKeyExpire(MMKV.ExpireInDay); // MMKV.ExpireInDay = 24 * 60 * 60
// enable auto key expiration without global duration
mmkv.enableAutoKeyExpire(MMKV.ExpireNever); // MMKV.ExpireNever = 0

And support set function parameter uint32_t expireDuration

bool MMKV::set(int32_t value, MMKVKey_t key, uint32_t expireDuration) {
}

But not seen in this library.

I hope react-native-mmkv can support those feature.

@davistsin
Copy link
Author

Also wanna add trim() function.

The totalSize() of an MMKV instance won't reduce after deleting key-values, call this method after lots of deleting if you care about disk usage. Note that clearAll() has a similar effect.

@mrousavy
Copy link
Owner

mrousavy commented Dec 13, 2023

Also wanna add trim() function.

#461

@lohenyumnam
Copy link

Any Plan to add this feature?? @mrousavy

@mrousavy
Copy link
Owner

Not in my free time, no

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