various fixes on redis as sessions db#1064
Conversation
…e such keys passed into updateTTLConn() would get duplicate prefixes failing the ttl reset
kataras
left a comment
There was a problem hiding this comment.
Hello @akiraho,
That's good but the fix / lifetime.Time not updated on expiration shift is wrong, we can't just add the duration from the current time. The shift expiration does not "adds" lifetime, it is re-set its to the configured, with the current commit you pushed you just extend it not reset it: if a session entry had 20 mins to be expired, and the configured was 30minutes, then you make it 50minutes instead of 30minutes (which is what ShiftExpiration does). Time should be re-seted, not add.
|
Hi @kataras,
So the result is that everything points to the new expiration @08:50. Isn't that what we want to achieve? Thanks. |
|
Oh, excuse me @akiraho I seen |
various fixes on redis as sessions db Former-commit-id: 0fb804f095c37d340eeaf595806329a67c5b43ac
lifetime.Time not updated on expiration shift
redis service.TTL() return values were incorrect and incompatible wtih its consumers such as redis database.Acquire(); this fix re-aligns the return values so: