Skip to content
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

Redis를 이용한 글 작성 제한 개수 설정 #16

Open
2 of 3 tasks
shoeone96 opened this issue Dec 2, 2023 · 0 comments
Open
2 of 3 tasks

Redis를 이용한 글 작성 제한 개수 설정 #16

shoeone96 opened this issue Dec 2, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@shoeone96
Copy link
Collaborator

shoeone96 commented Dec 2, 2023

1 주차 추가 미션

  • Redis를 사용해보자.
  • 한 사용자가 하루에 글을 10개 이상 작성하지 못하게 한다.
    • Spring Batch 도입해보기
  • 한 사용자가 1분 내로 5개의 글을 연속으로 작성하는 것을 막는다.
  • Redis(PostCouner) 데이터 구조

userId(key) totalWriteCnt lastPostedAt totalWritePerMin lastPostedAt
키 값 하루 동안 쓴 글 개수 하루 중 가장 최근의 글 1분 동안 쓴 글 개수 1분 단위의 글 중 가장 처음에 글 쓴 시각
@Sehee-Lee-01 Sehee-Lee-01 added the enhancement New feature or request label Dec 2, 2023
shoeone96 added a commit that referenced this issue Dec 2, 2023
shoeone96 added a commit that referenced this issue Dec 2, 2023
shoeone96 added a commit that referenced this issue Dec 2, 2023
유저별 postCount를 Redis에 저장할 클래스 생성
- 유저가 글을 작성하는 상황별 로직 추가
* LocalDateTime 직렬화를 위한 @JsonSerialize, @JsonDeserialize 도입
shoeone96 added a commit that referenced this issue Dec 2, 2023
RedisTemplate을 이용한 PostCounter 저장 및 탐색 메서드 추가
@Sehee-Lee-01 Sehee-Lee-01 changed the title Redis를 이용한 하루 글 작성 제한 개수 설정 Redis를 이용한 글 작성 제한 개수 설정 Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants