Skip to content

[#43] 디바운스를 구현하여 서버 요청을 최소화한다 - #49

Merged
opficdev merged 8 commits into
developfrom
feat/#43-debounce
Jun 19, 2026
Merged

opficdev merged 8 commits into
developfrom
feat/#43-debounce

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

📝 작업 내용

📌 요약

  • 성공한 GET 응답을 짧은 TTL 동안 재사용하는 memory cache 추가
  • 동시에 실행되는 동일 GET 요청을 하나의 transport 호출로 처리하도록 구성
  • 요청 builder 내부 상태 노출 범위 축소 및 README 반영

🔍 상세

  • NXClientConfiguration(cache:) 옵션 추가
  • NXCache.disabled, NXCache.memory(ttl:) 추가
  • NXResponseCacheInterceptor, NXResponseCacheStore, NXRequestCacheKey 추가
  • cache 대상 조건을 GET, body 없음, .authorized() 미사용, 성공 status code로 제한
  • cache key 기준을 HTTP method, URL, header set으로 구성
  • NXRequestBuilder.requestSpec 내부 상태를 private으로 변경
  • README.md, README.ko.mdNXCache 사용 방식 추가

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jun 19, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 성공한 비인증 GET 응답의 캐싱 및 동일 요청 병합을 위한 인메모리 캐시 기능(NXCache)을 도입합니다. 코드 리뷰 결과, NXResponseCacheStore에서 호출자 Task 취소 시 요청 병합이 깨지는 버그와 만료된 캐시가 누적되는 메모리 누수 문제가 발견되었습니다. 이를 해결하기 위해 비동기 Task 내부에서 성공/실패 처리를 수행하고 만료된 캐시를 명시적으로 제거하도록 개선을 요청했습니다.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Sources/Nexa/Runtime/NXResponseCacheStore.swift
@opficdev
opficdev merged commit 8b1cfe4 into develop Jun 19, 2026
4 checks passed
@opficdev
opficdev deleted the feat/#43-debounce branch June 19, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

디바운스를 구현하여 서버 요청을 최소화한다

1 participant