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

Implement HSETXX #13067

Open
Cheban1996 opened this issue Feb 19, 2024 · 2 comments · May be fixed by #9058
Open

Implement HSETXX #13067

Cheban1996 opened this issue Feb 19, 2024 · 2 comments · May be fixed by #9058

Comments

@Cheban1996
Copy link

The problem/use-case that the feature addresses

local exists = redis.call('EXISTS', KEYS[1])
if exists == 1 then
    redis.call('HSET', KEYS[1], 'expire', ARGV[1])
end
return exists

A description of the problem that the feature will solve, or the use-case with which the feature will be used.
I'm currently using this script via EVAL. But I think the best option would be if we have the HSETXX command.

Description of the feature
HSET if keys exist and return true/false if keys exist

A description of what you want to happen.
HSETXX only for existing keys and return true/false if key exist

Alternatives you've considered
HSETNX, but it is only for non-existing keys

Any alternative solutions or features you've considered, including references to existing open and closed feature requests in this repository.
HSETXX searching do nothing

Additional information

Any additional information that is relevant to the feature request.

@enjoy-binbin
Copy link
Collaborator

look like it can be fit into #9058

@Cheban1996
Copy link
Author

Cheban1996 commented Feb 19, 2024

look like it can be fit into #9058

Нes it looks similar
I think HSETXX name it's better then HSETEX
But it isn't import for me

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 a pull request may close this issue.

2 participants