Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-backend
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
cloud-backend
Commits
e3ccb0c0
Commit
e3ccb0c0
authored
Jul 12, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.0
parent
3b1b72fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
common-utils/src/main/java/com/zq/common/config/redis/RedisUtils.java
+11
-11
No files found.
common-utils/src/main/java/com/zq/common/config/redis/RedisUtils.java
View file @
e3ccb0c0
...
@@ -283,19 +283,19 @@ public class RedisUtils {
...
@@ -283,19 +283,19 @@ public class RedisUtils {
if
(
keys
!=
null
&&
keys
.
length
>
0
)
{
if
(
keys
!=
null
&&
keys
.
length
>
0
)
{
if
(
keys
.
length
==
1
)
{
if
(
keys
.
length
==
1
)
{
boolean
result
=
redisTemplate
.
delete
(
keys
[
0
]);
boolean
result
=
redisTemplate
.
delete
(
keys
[
0
]);
log
.
info
(
"--------------------------------------------"
);
log
.
debug
(
"--------------------------------------------"
);
log
.
info
(
"删除缓存:{},结果:{}"
,
keys
[
0
],
result
);
log
.
debug
(
"删除缓存:{},结果:{}"
,
keys
[
0
],
result
);
log
.
info
(
"--------------------------------------------"
);
log
.
debug
(
"--------------------------------------------"
);
}
else
{
}
else
{
Set
<
String
>
keySet
=
new
HashSet
<>();
Set
<
String
>
keySet
=
new
HashSet
<>();
for
(
String
key
:
keys
)
{
for
(
String
key
:
keys
)
{
keySet
.
addAll
(
redisTemplate
.
keys
(
key
));
keySet
.
addAll
(
redisTemplate
.
keys
(
key
));
}
}
long
count
=
redisTemplate
.
delete
(
keySet
);
long
count
=
redisTemplate
.
delete
(
keySet
);
log
.
info
(
"--------------------------------------------"
);
log
.
debug
(
"--------------------------------------------"
);
log
.
info
(
"成功删除缓存:{}"
,
keySet
.
toString
());
log
.
debug
(
"成功删除缓存:{}"
,
keySet
.
toString
());
log
.
info
(
"缓存删除数量:{}个"
,
count
);
log
.
debug
(
"缓存删除数量:{}个"
,
count
);
log
.
info
(
"--------------------------------------------"
);
log
.
debug
(
"--------------------------------------------"
);
}
}
}
}
}
}
...
@@ -806,9 +806,9 @@ public class RedisUtils {
...
@@ -806,9 +806,9 @@ public class RedisUtils {
}
}
long
count
=
redisTemplate
.
delete
(
keys
);
long
count
=
redisTemplate
.
delete
(
keys
);
// 此处提示可自行删除
// 此处提示可自行删除
log
.
info
(
"--------------------------------------------"
);
log
.
debug
(
"--------------------------------------------"
);
log
.
info
(
"成功删除缓存:{}"
,
keys
.
toString
());
log
.
debug
(
"成功删除缓存:{}"
,
keys
.
toString
());
log
.
info
(
"缓存删除数量:{}个"
,
count
);
log
.
debug
(
"缓存删除数量:{}个"
,
count
);
log
.
info
(
"--------------------------------------------"
);
log
.
debug
(
"--------------------------------------------"
);
}
}
}
}
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