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
b6c4e27a
authored
2014-07-05 22:30:51 +0800
by
reterVision
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Adjust the action order in Put function.
1 parent
2933d1fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
cache/redis/redis.go
cache/redis/redis.go
View file @
b6c4e27
...
...
@@ -57,11 +57,11 @@ func (rc *RedisCache) Get(key string) interface{} {
// put cache to redis.
func
(
rc
*
RedisCache
)
Put
(
key
string
,
val
interface
{},
timeout
int64
)
error
{
_
,
err
:=
rc
.
do
(
"HSET"
,
rc
.
key
,
key
,
true
)
_
,
err
:=
rc
.
do
(
"SET"
,
key
,
val
)
if
err
!=
nil
{
return
nil
}
_
,
err
=
rc
.
do
(
"
SET"
,
key
,
val
)
_
,
err
=
rc
.
do
(
"
HSET"
,
rc
.
key
,
key
,
true
)
if
err
!=
nil
{
return
nil
}
...
...
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