Skip to content
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

Add documentation, missing options and datetime support to expire commands #36

Merged
merged 7 commits into from
Nov 8, 2023

Conversation

ytkimirti
Copy link
Collaborator

@ytkimirti ytkimirti commented Nov 6, 2023

Now expire and pexpire can be used with datetime.deltatime and
expireat and pexpireat can be used with datetime.datetime

import datetime

# Expire next month
date = datetime.datetime.now() + datetime.timedelta(days=30)
redis.expireat("mykey", date)

# Expire after a month
redis.expire("mykey", datetime.timedelta(days=30))
And they support the nx xx gt lt options

@ytkimirti ytkimirti merged commit 874b264 into main Nov 8, 2023
1 check passed
@mdumandag mdumandag deleted the expire-datetime branch November 8, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants