-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Support for hash field expiration (#2716)
Closes/Fixes #2715 This PR add support for a set of new commands related to expiration of individual members of hash: > **_HashFieldExpire_** exposes the functionality of commands HPEXPIRE/HPEXPIREAT, for each specified field, it gets the value and sets the field's remaining time to live or expireation timestamp > **_HashFieldExpireTime_** exposes the functionality of command HPEXPIRETIME, for specified field, it gets the remaining time to live in milliseconds or expiration timestamp > **_HashFieldPersist_** exposes the functionality of command HPERSIST, for each specified field, it removes the expiration time > **_HashFieldTimeToLive_** expoes the functionality of command HPTTL, for specified field, it gets the remaining time to live in milliseconds or expiration timestamp --------- Co-authored-by: Nick Craver <[email protected]> Co-authored-by: Nick Craver <[email protected]>
- Loading branch information
1 parent
8346a5c
commit e208905
Showing
14 changed files
with
721 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace StackExchange.Redis; | ||
|
||
/// <summary> | ||
/// Specifies the result of operation to set expire time. | ||
/// </summary> | ||
public enum ExpireResult | ||
{ | ||
/// <summary> | ||
/// Field deleted because the specified expiration time is due. | ||
/// </summary> | ||
Due = 2, | ||
|
||
/// <summary> | ||
/// Expiration time/duration updated successfully. | ||
/// </summary> | ||
Success = 1, | ||
|
||
/// <summary> | ||
/// Expiration not set because of a specified NX | XX | GT | LT condition not met. | ||
/// </summary> | ||
ConditionNotMet = 0, | ||
|
||
/// <summary> | ||
/// No such field. | ||
/// </summary> | ||
NoSuchField = -2, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace StackExchange.Redis; | ||
|
||
/// <summary> | ||
/// Specifies the result of operation to remove the expire time. | ||
/// </summary> | ||
public enum PersistResult | ||
{ | ||
/// <summary> | ||
/// Expiration removed successfully. | ||
/// </summary> | ||
Success = 1, | ||
|
||
/// <summary> | ||
/// Expiration not removed because of a specified NX | XX | GT | LT condition not met. | ||
/// </summary> | ||
ConditionNotMet = -1, | ||
|
||
/// <summary> | ||
/// No such field. | ||
/// </summary> | ||
NoSuchField = -2, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.