Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
8ed45951
Commit
8ed45951
authored
May 05, 2014
by
astaxie
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #591 from luosangnanka/master
Update Session package README.md
parents
e307bd7b
25768f01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
README.md
session/README.md
+4
-4
No files found.
session/README.md
View file @
8ed45951
...
...
@@ -35,14 +35,14 @@ 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:
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()
}
*
Use
**Redis**
as provider, the last param is the Redis conn address,poolsize,password:
func init() {
globalSessions, _ = session.NewManager("redis", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig"
,
"127.0.0.1:6379,100,astaxie"}`)
globalSessions, _ = session.NewManager("redis", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig"
:
"127.0.0.1:6379,100,astaxie"}`)
go globalSessions.GC()
}
...
...
@@ -50,7 +50,7 @@ Then in you web app init the global session manager
func init() {
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()
}
...
...
@@ -58,7 +58,7 @@ Then in you web app init the global session manager
func init() {
globalSessions, _ = session.NewManager(
"cookie", `{"cookieName":"gosessionid","enableSetCookie":false,gclifetime":3600,"ProviderConfig":"{\"cookieName\":\"gosessionid\",\"securityKey\":\"beegocookiehashkey\"}"}`)
"cookie", `{"cookieName":"gosessionid","enableSetCookie":false,
"
gclifetime":3600,"ProviderConfig":"{\"cookieName\":\"gosessionid\",\"securityKey\":\"beegocookiehashkey\"}"}`)
go globalSessions.GC()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment