移动端-过滤推荐岗位设置过期时间为2小时,否则redis会满
This commit is contained in:
@@ -548,7 +548,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
|||||||
List<ESJobDocument> jobListResult = iesJobSearchService.selectTextListExceptJobId(esJobSearch,jobList);
|
List<ESJobDocument> jobListResult = iesJobSearchService.selectTextListExceptJobId(esJobSearch,jobList);
|
||||||
//存入当前session中查看的岗位 避免重复 todo 定时删除 key上保存用户信息
|
//存入当前session中查看的岗位 避免重复 todo 定时删除 key上保存用户信息
|
||||||
jobList.addAll(jobListResult.stream().map(ESJobDocument::getJobId).collect(Collectors.toList()));
|
jobList.addAll(jobListResult.stream().map(ESJobDocument::getJobId).collect(Collectors.toList()));
|
||||||
redisCache.setCacheObject(esJobSearch.getSessionId(),jobList);
|
redisCache.setCacheObject(esJobSearch.getSessionId(),jobList,2,TimeUnit.HOURS);
|
||||||
List<ESJobDocument> esJobDocuments = userCollection(jobListResult);
|
List<ESJobDocument> esJobDocuments = userCollection(jobListResult);
|
||||||
return esJobDocuments;
|
return esJobDocuments;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user