feat: redis multi 추가 #35
Merged
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.
PR 의 종류는 어떤 것인가요?
수정이 필요하게된 이유가 무엇인가요? (Jira 이슈가 있다면크를 연결해주세요)
multi()기능 추가가 필요했습니다무엇을 어떻게 변경했나요?
1. MultiOperations 인터페이스 추가
2. FastCache 클래스에 multi() 메서드 구현
3. 지원하는 명령들
set,get,removelistPush,listPop,listUnshift,listShiftmapSet,mapGet,mapRemove,mapSetAll,mapGetAll,mapRemoveAllsetAdd,setRemove,setContains,setLengthexpire4. ioredis 호환성 수정
multiClient.exec()결과가[error, value]형태로 반환되는 것을 실제 값만 추출하도록 수정result.map(([, value]) => value)로 에러 부분 제거코드 변경을 이해하기 위한 배경지식이 필요하다면 설명 해주세요.
Redis MULTI/EXEC 패턴
원자적 실행의 장점
ioredis 라이브러리 특성
multi().exec()결과가[error, value]형태로 반환디펜던시 변경이 있나요?
ioredis의존성만 사용)어떻게 테스트 하셨나요?
1. 단위 테스트 추가
src/FastCache.spec.ts에multi()기능에 대한 포괄적인 테스트 추가2. 테스트 케이스
3. 실제 Redis 동작 검증
코드의 실행결과를 볼 수 있는 로그나 이미지가 있다면 첨부해주세요.
사용 예시
테스트 결과