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

Is there a way to set ExpiryAt in SetRangeInHash method #2496

Open
KarsonChow-ITK opened this issue Jan 21, 2025 · 1 comment
Open

Is there a way to set ExpiryAt in SetRangeInHash method #2496

KarsonChow-ITK opened this issue Jan 21, 2025 · 1 comment

Comments

@KarsonChow-ITK
Copy link

Hello, I’m using IStorageConnection interface, specifically the SetRangeInHash method, to insert multiple fields into a hash. However, I noticed that there doesn't seem to be an option to set an expiration time (ExpiryAt) for the hash records when using this method.

Before proposing an enhancement, I wanted to check if this functionality is already supported in some form that I might have missed. If not, it would be useful to have a way to set the expiration time for hash records during insertion.

@odinserj
Copy link
Member

odinserj commented Feb 4, 2025

It's possible to create a transaction first by calling the CreateWriteTransaction and cast it to the JobStorageTransaction type, where both SetRangeInHash and ExpireHash methods available. Please don't forget to call the Commit method once all required commands are executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants