rosedblabs / rosedb

Lightweight, fast and reliable key/value storage engine based on Bitcask.
https://rosedblabs.github.io
Apache License 2.0
4.58k stars 632 forks source link

Suggestion: Add a separate method for setting expiration time. #270

Closed taroim closed 1 year ago

taroim commented 1 year ago

The newly added PutWithTTL method only sets the expiration time during creation. Would it be possible to add a method that allows modifying the expiration time after creation?

This could be useful for scenarios such as retaining data that has been frequently accessed within the last 24 hours.

roseduan commented 1 year ago

OK, good idea, thanks

roseduan commented 1 year ago

Added in latest commit, will be released next time.