1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-28 10:24:14 +00:00
This commit is contained in:
astaxie 2013-08-09 23:41:03 +08:00
parent 0833d4baf8
commit 115b1d03db

View File

@ -22,12 +22,11 @@ func (rs *RedisSessionStore) Set(key, value interface{}) error {
} }
func (rs *RedisSessionStore) Get(key interface{}) interface{} { func (rs *RedisSessionStore) Get(key interface{}) interface{} {
//v, err := rs.c.Do("GET", rs.sid, key) reply, err := rs.c.Do("HGET", rs.sid, key)
v, err := redis.String(rs.c.Do("HGET", rs.sid, key))
if err != nil { if err != nil {
return nil return nil
} }
return v return reply
} }
func (rs *RedisSessionStore) Delete(key interface{}) error { func (rs *RedisSessionStore) Delete(key interface{}) error {
@ -56,7 +55,7 @@ func (rp *RedisProvider) connectInit() redis.Conn {
} }
return c*/ return c*/
//if redisPool == nil { //if redisPool == nil {
redisPool = make(chan redis.Conn, MAX_POOL_SIZE) redisPool = make(chan redis.Conn, MAX_POOL_SIZE)
//} //}
if len(redisPool) == 0 { if len(redisPool) == 0 {
go func() { go func() {