yeahoffline / redis-mock

Node.js redis client mock
213 stars 111 forks source link

Expire timeout is not cleared when changing value #184

Open fabiansperber opened 3 years ago

fabiansperber commented 3 years ago

"The timeout will only be cleared by commands that delete or overwrite the contents of the key, including DEL, SET, GETSET and all the *STORE commands." https://redis.io/commands/expire

Currently calling .set() does not clear the timeout - and others won't too.

Also calling .set() before the timeout expires, makes it impossible to change the timeout with a second .expire() call as the timeout information gets overwritten by .set()