mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 10:30:55 +00:00
Update README.md
Update the json format of session for file, redis, mysql, there are errors in these json string, after `ProviderConfig` params.
This commit is contained in:
parent
8164f9821d
commit
a56f67e073
@ -35,7 +35,7 @@ Then in you web app init the global session manager
|
|||||||
* Use **file** as provider, the last param is the path where you want file to be stored:
|
* Use **file** as provider, the last param is the path where you want file to be stored:
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
globalSessions, _ = session.NewManager("file",`{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig","./tmp"}`)
|
globalSessions, _ = session.NewManager("file",`{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig":"./tmp"}`)
|
||||||
go globalSessions.GC()
|
go globalSessions.GC()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ Then in you web app init the global session manager
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
globalSessions, _ = session.NewManager(
|
globalSessions, _ = session.NewManager(
|
||||||
"mysql", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig","username:password@protocol(address)/dbname?param=value"}`)
|
"mysql", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig":"username:password@protocol(address)/dbname?param=value"}`)
|
||||||
go globalSessions.GC()
|
go globalSessions.GC()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user