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.