-
Notifications
You must be signed in to change notification settings - Fork 63
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
Is there an API for RedisKeyWritable to remove expiration for a key #275
Comments
Submitted PR to address this #276 |
set_expire()
with REDISMODULE_NO_EXPIRE
to persist the key
@gkorland @MeirShpilraien Another option instead of adding a BTW, this would not entirely prevent failures even with |
I noticed that when I open a key for writing via
context.open_key_writable()
, I can only callset_expire()
with a duration that is >= 0. However, I noticed the low level APIraw::set_expire()
takes the expiration timestamp asc_long_long
which can beREDISMODULE_NO_EXPIRE
to make the key not expire. In this case there doesn't seem to be a way for me to do this using theset_expire()
API. Seeredismodule-rs/src/key.rs
Line 269 in cc05327
i.e.
Is there a way for me to remove the expiration of the key using the
RedisKeyWritable
APIs? I tried to call theraw::set_expire()
method but it seems like it needsRedisModuleKey
as parameter. But theRedisModuleKey
field insideRedisKeyWritable
is private and can't be accessed. Seeredismodule-rs/src/key.rs
Line 169 in cc05327
The text was updated successfully, but these errors were encountered: