Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
87ec11d1
Commit
87ec11d1
authored
Nov 07, 2017
by
Java—红包—徐 然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改删除缓存
parent
6a5d6f17
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
SessionServiceImpl.java
...ntgroup/xyqb/service/session/impl/SessionServiceImpl.java
+10
-6
No files found.
src/main/java/cn/quantgroup/xyqb/service/session/impl/SessionServiceImpl.java
View file @
87ec11d1
...
...
@@ -197,25 +197,29 @@ public class SessionServiceImpl implements ISessionService {
});
//2.删除session缓存健
stringRedisTemplate
.
delete
(
Constants
.
Session
.
USER_SESSION_KEY_SET
+
userId
);
}
//3.删除用户查询缓存
User
user
=
userService
.
findById
(
userId
);
if
(
null
!=
user
)
{
deleteUserCatch
(
user
);
}
}
}
/**
* 删除注销后缓存查询结果
*
* @param user
*/
@Caching
(
evict
=
{
@CacheEvict
(
value
=
"usercache"
,
key
=
"'xyqbuser' + #user.phoneNo"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"usercache"
,
key
=
"'xyqbuser' + #user.uuid"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"addresscache"
,
key
=
"'address' + #user.id"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"contact"
,
key
=
"'contact' + #user.id"
,
cacheManager
=
"cacheManager"
)})
@CacheEvict
(
value
=
"contact"
,
key
=
"'contact' + #user.id"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"userSpouseCache"
,
key
=
"'spouse' + #user.id"
,
cacheManager
=
"cacheManager"
),
@CacheEvict
(
value
=
"btRegisterCache"
,
key
=
"'userId' + #user.id"
,
cacheManager
=
"cacheManager"
)})
private
void
deleteUserCatch
(
User
user
)
{
}
...
...
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