Skip to content

Implement Redis 7.0.0 [P]EXPIRE[AT] options#2188

Merged
michael-grunder merged 1 commit into
developfrom
issue.2068-expire-options
Oct 13, 2022
Merged

Implement Redis 7.0.0 [P]EXPIRE[AT] options#2188
michael-grunder merged 1 commit into
developfrom
issue.2068-expire-options

Conversation

@michael-grunder
Copy link
Copy Markdown
Member

See #2068

@michael-grunder
Copy link
Copy Markdown
Member Author

@yatsukhnenko I wasn't really sure the best way to handle the new option.

This way is flexible, but I wonder if we should instead take an options array for future-proofing (e.g. if Redis adds more exotic options to this command).

@yatsukhnenko
Copy link
Copy Markdown
Member

@michael-grunder currently in set and zadd commands we use array to handle NX/EX/etc options so maybe it worth to implement it here but I'm totally fine with current implementation.

Comment thread redis_commands.c
@michael-grunder michael-grunder force-pushed the issue.2068-expire-options branch from e898340 to b9235e7 Compare October 13, 2022 18:16
@michael-grunder
Copy link
Copy Markdown
Member Author

@yatsukhnenko I added a check on the mode argument and updated our stubs/docs with actual documentation.

I think maybe we should break this command in PhpRedis 6.0.0 to instead return an integer (0 when an expiration was not set, 1 when an expiration was set, and false on failure).

@michael-grunder michael-grunder merged commit 872ae10 into develop Oct 13, 2022
@michael-grunder michael-grunder deleted the issue.2068-expire-options branch October 13, 2022 18:31
@michael-grunder michael-grunder mentioned this pull request Oct 13, 2022
37 tasks
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