요약
데이터 저장
Cache key 는 URL + QueryString사용
ex ) key : /userAccount?id=123 , value : {….}
- GET(URL) → Cashe Key(QueryString)
- 상태 코드에 대한 필요성은 없다 (200 Default)
- why? 데이터가 없다면 → 메인 서버로 요청하기 때문
필요 속성
- url
- Query String (나눌 필요가 있다면)
- 해당 API URL 에 대한 Main 서버의 Response → Value
- 생성 시간
- 해당 캐시의 만료 기한
-
1차적인 캐시 저장 ERD
1차 이후 의논
- id 값을 increase_value로 두지 않고 URL로 두는 편이 좋지 않은가?
- 파라미터를 굳이 따로 저장하지 않고 url이 전부 가지고 있어도 될 것 같다.