-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Compatibility] Added EXPIREAT and PEXPIREAT command and bug fixes fo…
…r EXPIRE and PEXPIRE (#666) * Added EXPIREAT and PEXPIREAT command and bug fixes for EXPIRE and PEXPIRE * Code style fix * Review comment fixes * Fixed merge conflict and fixed review comments * Changed to _unixEpochTicks
- Loading branch information
1 parent
64636ce
commit 748ec9a
Showing
16 changed files
with
1,070 additions
and
18 deletions.
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
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 |
---|---|---|
@@ -1,32 +1,43 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
using System; | ||
|
||
namespace Garnet.server | ||
{ | ||
/// <summary> | ||
/// Expire option | ||
/// </summary> | ||
[Flags] | ||
public enum ExpireOption : byte | ||
{ | ||
/// <summary> | ||
/// None | ||
/// </summary> | ||
None, | ||
None = 0, | ||
/// <summary> | ||
/// Set expiry only when the key has no expiry | ||
/// </summary> | ||
NX, | ||
NX = 1 << 0, | ||
/// <summary> | ||
/// Set expiry only when the key has an existing expiry | ||
/// </summary> | ||
XX, | ||
XX = 1 << 1, | ||
/// <summary> | ||
/// Set expiry only when the new expiry is greater than current one | ||
/// </summary> | ||
GT, | ||
GT = 1 << 2, | ||
/// <summary> | ||
/// Set expiry only when the new expiry is less than current one | ||
/// </summary> | ||
LT | ||
LT = 1 << 3, | ||
/// <summary> | ||
/// Set expiry only when the key has an existing expiry and the new expiry is greater than current one | ||
/// </summary> | ||
XXGT = XX | GT, | ||
/// <summary> | ||
/// Set expiry only when the key has an existing expiry and the new expiry is less than current one | ||
/// </summary> | ||
XXLT = XX | LT, | ||
} | ||
} |
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.