Skip to content

Commit e9d10ee

Browse files
committed
update expire
1 parent af8692c commit e9d10ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

redis.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (s *managerStore) Update(ctx context.Context, sid string, expired int64) (s
8585
}, nil
8686
}
8787

88-
cmd := s.cli.Set(sid, value, time.Duration(expired)*time.Second)
88+
cmd := s.cli.Expire(sid, time.Duration(expired)*time.Second)
8989
if err = cmd.Err(); err != nil {
9090
return nil, err
9191
}
@@ -94,6 +94,7 @@ func (s *managerStore) Update(ctx context.Context, sid string, expired int64) (s
9494
if err != nil {
9595
return nil, err
9696
}
97+
9798
return &store{
9899
ctx: ctx,
99100
sid: sid,

0 commit comments

Comments
 (0)