Merged
Conversation
- PhotoURLCache를 NSLock 제거 후 actor 기반 LRU 캐시(최대 12개)로 교체 - fetchPhotoURLs를 AsyncThrowingStream으로 변경하여 stale-while-revalidate 패턴 적용 - 캐시 HIT 시 즉시 방출 후 서버 검증, 데이터 변경 시 재방출 - 캐시 MISS 시 서버 응답만 방출 - FetchMonthlyCalendarDaysUseCase도 AsyncThrowingStream 반환으로 변경 - InvalidateMonthCacheUseCase 및 invalidatePhotoURLCache 제거 (LRU 자동 evict로 대체) - PrefetchAdjacentMonthsUseCase 제거 및 FetchMonthlyCalendarDaysUseCase 내부로 통합 - MockFoodRecordRepository 시그니처 업데이트
kanghun1121
commented
Mar 25, 2026
| public func execute(for period: DateInterval, currentMonth: Date) async throws -> [MonthlyCalendarDay] { | ||
| let calendar = Calendar.seoul | ||
| let recordsByDate = try await repository.fetchPhotoURLs(in: period.start...period.end) | ||
| public func execute(for period: DateInterval, currentMonth: Date) -> AsyncThrowingStream<[MonthlyCalendarDay], Error> { |
Member
Author
There was a problem hiding this comment.
데이터를 반응형으로 던져야하다보니 AsyncStream을 사용함!
Combine을 사용할까도 생각했는데, 그러면 Domain이 Combine을 의존해야 해서.. Concurrency로 했습니당
enebin
reviewed
Mar 26, 2026
Member
enebin
left a comment
There was a problem hiding this comment.
태스크 관리하는 거 코멘트 하나 있는데 그거 보고 수정하는거 맞는지 확인 한 번 해줘ㅎㅎ 나머지는 굿!
enebin
approved these changes
Mar 28, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✏️ 변경 내용
✅ 체크리스트
캐싱은 다음과 같이 SWR 기반으로 적용했습니다! (서버와 데이터 불일치 문제 때문)