mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 18:50:55 +00:00
fix #138
This commit is contained in:
parent
0833d4baf8
commit
115b1d03db
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user