-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
127 feat 인기 포트폴리오 방식 변경 #128
Open
kcsc2217
wants to merge
9
commits into
develop
Choose a base branch
from
127-feat-인기-포트폴리오-방식-변경
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
The head ref may contain hidden characters: "127-feat-\uC778\uAE30-\uD3EC\uD2B8\uD3F4\uB9AC\uC624-\uBC29\uC2DD-\uBCC0\uACBD"
+973
−501
Open
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
860ee17
feat: 포트폴리오 전체조회시 좋아요 여부 반영
kcsc2217 6d5be77
feat: 인기 포폴 방식 변경 및 유저 좋아요 여부 반영
kcsc2217 6f219d3
fix 코드 리팩터링
kcsc2217 ef19e78
fix 코드 리팩터링
kcsc2217 ce41cac
feat: 저장소 Map에서 Redis String 으로 변경
kcsc2217 f0a5132
fix: 저장소 redis 변경 후 테스트 코드 수정
kcsc2217 5225604
feat: 인기 포트폴리오 방식 zset_>List 방식으로 변경
kcsc2217 9fca161
tset: 포트폴리오 테스틐 코드 작성
kcsc2217 7a05aec
feat: 포폴과 같은 방식으로 인기 게더링
kcsc2217 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,11 +24,12 @@ public void updateRedisToDb(){ | |
redisService.categoryToDb("portFolio"); | ||
redisService.categoryToDb("gathering"); | ||
|
||
//여기에 아카이빙이나 게더링 넣으시면 됩니다 | ||
// //여기에 아카이빙이나 게더링 넣으시면 됩니다 | ||
// redisService.deleteKeyIncludePattern("Like_*", "_targetCount"); | ||
} | ||
|
||
/** | ||
* 한식간 마다 로컬 캐시에 있는 가중치를 꺼내어 Zset에 반영 | ||
* 매 10분마다 가중치 반영 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 전체적으로 시간 단위가 통일되어 있지 않은 느낌이 있음. |
||
*/ | ||
@Scheduled(cron = "3 * * * * *") | ||
public void rankingRedis(){ | ||
|
@@ -37,7 +38,7 @@ public void rankingRedis(){ | |
redisRankingZset(); | ||
|
||
//순위 여부 확인 후 비우기 | ||
redisCacheDelete(); | ||
// redisCacheDelete(); | ||
|
||
// 여기에 아카이브 넣으시면 됩니다. | ||
|
||
|
@@ -48,13 +49,13 @@ public void rankingRedis(){ | |
|
||
//카운트 redis 한번 비우기 | ||
redisService.deleteKeyExceptionPattern("View_*", "_user"); | ||
redisService.deleteKeyExceptionPattern("Like_*", "_user"); | ||
redisService.deleteKeyExceptionPatterns("Like_*", "_user","_targets"); | ||
} | ||
|
||
/** | ||
* 자정 시간 조회수 리셋 즉 하루에 한번은 카테고리를 조회 할 수 있음 | ||
*/ | ||
@Scheduled(cron = "4 * * * * *", zone = "Asia/Seoul") | ||
@Scheduled(cron = "0 0 0 * * *", zone = "Asia/Seoul") | ||
public void hitsSet(){ | ||
redisService.deleteKeyIncludePattern("View_*", "_user"); | ||
} | ||
|
@@ -63,7 +64,7 @@ public void hitsSet(){ | |
* ZSET 한번 비우고 새로운 가중치 ZSET 반영 | ||
*/ | ||
private void redisRankingZset() { | ||
redisService.deleteKeyExceptionPattern("portFolio_*", null); | ||
// redisService.deleteKeyExceptionPattern("portFolio_*", null); | ||
|
||
redisService.rankingCategory("portFolio"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나도 성능 체크를 해보긴 해야하는데
contains 보다
userTargetKey.split("_")[2].equals("targets");
이런식으로 구현하면 더 좋지 않을까 싶긴 함