-
Notifications
You must be signed in to change notification settings - Fork 78
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
Support expires_in
for List
, Set
, UniqueList
, OrderedSet
#143
base: main
Are you sure you want to change the base?
Conversation
Hi @heka1024, thanks for this PR. I was looking for expiration on sets and happy to find your work. Do you plan to also add expiration to the ActiveModel attributes via the Kredis::Attributes concern? You can grab the code (without extra tests for now) here: https://github.com/bb/kredis/blob/support-ttl/lib/kredis/attributes.rb, just cherry-pick the latest commit. Also, I'm afraid to get this PR merged, some documentation is needed. |
@bb Thanks. I'll chery pick your commit and supplement documentation. |
@bb I just cherry-picked your commit and add some test with documentation. Could you review it? |
Hey @heka1024, thanks a lot! The tests you already added in the last commits look good to me. I'm afraid there's no test for ordered set yet. Docs look also good, I don't think exhaustive examples of all params is needed here, so I'd leave it as is. Keep in mind I'm not a maintainer here, so in the end it's not my decision. |
Thanks for adding the missing test @heka1024. LGTM. Maybe @dhh (or another maintainer) can have a look now because his concern about test failures in #133 (comment) is addressed now. |
any reasons why this list doesn't include Hash ? |
@balbesina. I just added expiration behavior in hash. I rarely used Redis's hash, I just forgot it 😅. |
Hi, @dhh. Could you review this? I fixed #133 (comment) failing tests. |
Although this is a different topic, have you considered adding an expires_at option? relates rails/rails#41831 |
@roharon It'll be nice if we can set |
@heka1024 Cool, I'll work on it. |
@heka1024 - Please let me know if you need any help with this PR to get it merged. It will be useful for me too. |
Extending the approach taken by #142, now users can set
expires_in
forList
,Set
,UniqueList
,OrderedSet