tj / connect-redis

Redis session store for Connect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question: Is disableTTL working properly?

evan361425 opened this issue · comments

While I am trying to understand the source code, I have notice the code below:

https://github.com/tj/connect-redis/blob/master/lib/connect-redis.js#L68-L75

args.push(value)
// maybe we should delete below line?
args.push("EX", this._getTTL(sess))

let ttl = 1
if (!this.disableTTL) {
  ttl = this._getTTL(sess)
  args.push("EX", ttl)
}

Will line 69 makes disableTTL worked improperly?

This comment, may be related to a buggy set of code we reverted recently. Do you still see this issue present in the current code?

It solved!