9
9
"github.com/go-redis/redis/v8/internal"
10
10
)
11
11
12
- // KeepTTL is an option for Set command to keep key's existing TTL.
13
- // It requires your redis-server version >= 6.0 (Otherwise you will receive an error: (error) ERR syntax error) .
12
+ // KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0,
13
+ // otherwise you will receive an error: (error) ERR syntax error.
14
14
// For example:
15
15
//
16
16
// rdb.Set(ctx, key, value, redis.KeepTTL)
@@ -841,8 +841,8 @@ func (c cmdable) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd {
841
841
// Use expiration for `SETEX`-like behavior.
842
842
//
843
843
// Zero expiration means the key has no expiration time.
844
- // KeepTTL(-1) expiration is a Redis KEEPTTL option to keep existing TTL.
845
- // It requires your redis-server version >= 6.0 (Otherwise you will receive an error: (error) ERR syntax error) .
844
+ // KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0,
845
+ // otherwise you will receive an error: (error) ERR syntax error.
846
846
func (c cmdable ) Set (ctx context.Context , key string , value interface {}, expiration time.Duration ) * StatusCmd {
847
847
args := make ([]interface {}, 3 , 5 )
848
848
args [0 ] = "set"
@@ -875,8 +875,8 @@ type SetArgs struct {
875
875
// When Get is true, the command returns the old value stored at key, or nil when key did not exist.
876
876
Get bool
877
877
878
- // KeepTTL is a Redis KEEPTTL option to keep existing TTL.
879
- // It requires your redis-server version >= 6.0 (Otherwise you will receive an error: (error) ERR syntax error) .
878
+ // KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0,
879
+ // otherwise you will receive an error: (error) ERR syntax error.
880
880
KeepTTL bool
881
881
}
882
882
@@ -924,8 +924,8 @@ func (c cmdable) SetEX(ctx context.Context, key string, value interface{}, expir
924
924
// SetNX Redis `SET key value [expiration] NX` command.
925
925
//
926
926
// Zero expiration means the key has no expiration time.
927
- // KeepTTL(-1) expiration is a Redis KEEPTTL option to keep existing TTL.
928
- // It requires your redis-server version >= 6.0 (Otherwise you will receive an error: (error) ERR syntax error) .
927
+ // KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0,
928
+ // otherwise you will receive an error: (error) ERR syntax error.
929
929
func (c cmdable ) SetNX (ctx context.Context , key string , value interface {}, expiration time.Duration ) * BoolCmd {
930
930
var cmd * BoolCmd
931
931
switch expiration {
@@ -949,8 +949,8 @@ func (c cmdable) SetNX(ctx context.Context, key string, value interface{}, expir
949
949
// SetXX Redis `SET key value [expiration] XX` command.
950
950
//
951
951
// Zero expiration means the key has no expiration time.
952
- // KeepTTL(-1) expiration is a Redis KEEPTTL option to keep existing TTL.
953
- // It requires your redis-server version >= 6.0 (Otherwise you will receive an error: (error) ERR syntax error) .
952
+ // KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0,
953
+ // otherwise you will receive an error: (error) ERR syntax error.
954
954
func (c cmdable ) SetXX (ctx context.Context , key string , value interface {}, expiration time.Duration ) * BoolCmd {
955
955
var cmd * BoolCmd
956
956
switch expiration {
0 commit comments