Browse Source

redisession

张金坤 8 years ago
parent
commit
92740879d8
1 changed files with 3 additions and 1 deletions
  1. 3 1
      common/src/github.com/go-xweb/httpsession/redissessionstore.go

+ 3 - 1
common/src/github.com/go-xweb/httpsession/redissessionstore.go

@@ -95,7 +95,9 @@ func (store *redisStore) UpdateByCustomField(findkey string, findvalue interface
 	}
 	var data map[string]interface{}
 	json.Unmarshal(*bs, &data)
-
+	data[setkey] = setvalue
+	putdata, _ := json.Marshal(data)
+	redis.PutBytes("session", findkey, &putdata, int(store.maxAge.Seconds()))
 	store.lock.Unlock()
 	return true
 }