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
cb55009c
authored
2014-01-10 20:31:43 +0800
by
Pengfei Xue
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
remove mutex
1 parent
b64e70e7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
cache/redis.go
cache/redis.go
View file @
cb55009
...
...
@@ -3,7 +3,6 @@ package cache
import
(
"encoding/json"
"errors"
"sync"
"time"
"github.com/beego/redigo/redis"
...
...
@@ -19,7 +18,6 @@ type RedisCache struct {
p
*
redis
.
Pool
// redis connection pool
conninfo
string
key
string
mu
sync
.
Mutex
}
// create new redis cache with default collection name.
...
...
@@ -117,8 +115,6 @@ func (rc *RedisCache) StartAndGC(config string) error {
// connect to redis.
func
(
rc
*
RedisCache
)
connectInit
()
{
rc
.
mu
.
Lock
()
// initialize a new pool
rc
.
p
=
&
redis
.
Pool
{
MaxIdle
:
3
,
...
...
@@ -131,8 +127,6 @@ func (rc *RedisCache) connectInit() {
return
c
,
nil
},
}
rc
.
mu
.
Unlock
()
}
func
init
()
{
...
...
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