Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
43f588b5
authored
2013-06-20 15:25:39 +0300
by
Dobrosław Żybort
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix: session README
1 parent
cc6c84b3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
session/README.md
session/README.md
View file @
43f588b
...
...
@@ -32,25 +32,25 @@ Then in you web app init the global session manager
go globalSessions.GC()
}
*
Use
**
MySQL**
as provider, the last param is the DNS, learn more from
[
mysql
](
https://github.com/Go-SQL-Driver/MySQL#dsn-data-source-name
)
:
*
Use
**
file**
as provider, the last param is the path where you want file to be stored:
func init() {
globalSessions, _ = session.NewManager(
"mysql", "gosessionid", 3600, "username:password@protocol(address)/dbname?param=value")
globalSessions, _ = session.NewManager("file", "gosessionid", 3600, "./tmp")
go globalSessions.GC()
}
*
Use
**
file**
as provider, the last param is the path where you want file to be stored
:
*
Use
**
Redis**
as provider, the last param is the Redis conn address
:
func init() {
globalSessions, _ = session.NewManager("
file", "gosessionid", 3600, "./tmp
")
globalSessions, _ = session.NewManager("
redis", "gosessionid", 3600, "127.0.0.1:6379
")
go globalSessions.GC()
}
*
Use
**
Redis**
as provider, the last param is the Redis conn address:
*
Use
**
MySQL**
as provider, the last param is the DSN, learn more from
[
mysql
](
https://github.com/Go-SQL-Driver/MySQL#dsn-data-source-name
)
:
func init() {
globalSessions, _ = session.NewManager("redis", "gosessionid", 3600, "127.0.0.1:6379")
globalSessions, _ = session.NewManager(
"mysql", "gosessionid", 3600, "username:password@protocol(address)/dbname?param=value")
go globalSessions.GC()
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment