Commit 1eb9aef6 authored by Brandon Gao's avatar Brandon Gao

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`.
parent f9e991b5
...@@ -109,7 +109,7 @@ func (rs *RedisSessionStore) SessionRelease(w http.ResponseWriter) { ...@@ -109,7 +109,7 @@ func (rs *RedisSessionStore) SessionRelease(w http.ResponseWriter) {
return return
} }
c.Do("SET", rs.sid, string(b), "EX", rs.maxlifetime) c.Do("SETEX", rs.sid, rs.maxlifetime, string(b))
} }
// redis session provider // redis session provider
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment