mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 11:30:55 +00:00
Use SETEX command to set session
In order to be compatible with older version Redis, use `SETEX` command instead of `SET x y EX 360`.
This commit is contained in:
parent
f9e991b538
commit
1eb9aef687
@ -109,7 +109,7 @@ func (rs *RedisSessionStore) SessionRelease(w http.ResponseWriter) {
|
||||
return
|
||||
}
|
||||
|
||||
c.Do("SET", rs.sid, string(b), "EX", rs.maxlifetime)
|
||||
c.Do("SETEX", rs.sid, rs.maxlifetime, string(b))
|
||||
}
|
||||
|
||||
// redis session provider
|
||||
|
Loading…
Reference in New Issue
Block a user