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