Skip to content

Commit 3b28243

Browse files
authored
Improve set performance (#423)
1 parent 39c5a60 commit 3b28243

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ export class RedisStore extends Store {
9393
let key = this.prefix + sid
9494
let ttl = this._getTTL(sess)
9595
try {
96-
let val = this.serializer.stringify(sess)
9796
if (ttl > 0) {
97+
let val = this.serializer.stringify(sess)
9898
if (this.disableTTL) await this.client.set(key, val)
9999
else await this.client.set(key, val, ttl)
100100
return cb()

0 commit comments

Comments
 (0)