You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
로컬 캐시기능을 구현하였습니다.
## Changes
- private class field 사용을 위해 compilerOptions의 target을 es6로 변경하였습니다.
- 메모리에 API의 결과값을 저장할 수 있는 `CacheRepository`를 구현하였습니다.
- 다양한 타입에 대응할 수 있도록 제네릭으로 구현하였습니다.
- useSuggestions 커스텀 훅에 캐시기능을 연동하였습니다.
- 해당 검색어에 대한 캐시가 존재하고, expireTime이 지나지 않았으면 캐시에 저장된 값으로 suggestions의 상태를
업데이트합니다.
- 해당 검색어에 대한 캐시가 존재하지 않거나, expireTime이 지났으면, API 응답 값으로 suggestions의 상태를
업데이트하고 캐시에 결과값을 저장합니다.
Todo
The text was updated successfully, but these errors were encountered: