Skip to content

Commit 9a00cea

Browse files
refactor(server): simplify Redis store saveSession()
1 parent 6ba2163 commit 9a00cea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/stores.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ export class RedisStore extends Store {
6262
}
6363

6464
saveSession(sessionId: string) {
65-
const key = this.computeKey(sessionId);
66-
this.redisClient
67-
.multi()
68-
.set(key, true)
69-
.expire(key, this.options.sessionDuration)
70-
.exec();
65+
this.redisClient.set(
66+
this.computeKey(sessionId),
67+
"1",
68+
"EX",
69+
"" + this.options.sessionDuration
70+
);
7171
}
7272
}
7373

0 commit comments

Comments
 (0)