refactor(server): simplify Redis store saveSession()
This commit is contained in:
parent
6ba21636d3
commit
9a00cea5b4
|
|
@ -62,12 +62,12 @@ export class RedisStore extends Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveSession(sessionId: string) {
|
saveSession(sessionId: string) {
|
||||||
const key = this.computeKey(sessionId);
|
this.redisClient.set(
|
||||||
this.redisClient
|
this.computeKey(sessionId),
|
||||||
.multi()
|
"1",
|
||||||
.set(key, true)
|
"EX",
|
||||||
.expire(key, this.options.sessionDuration)
|
"" + this.options.sessionDuration
|
||||||
.exec();
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue