get_board_db
Hook이 제대로 동작하지 않는 문제 수정
#298
Closed
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.
get_board_db()
함수에서get_board_db
Hook이 실행될 때 첫번째 콜백에 항상 빈 배열이 전달되어 Hook이 제대로 동작할 수 없고, 이get_board_db()
함수 내부에서 정적변수로 캐시한 데이터 마저 역시 빈 배열로 대체시켜 cache 도 제대로 동작하지 않는 문제를 수정합니다.현재는 아래와 같은 문제로 인해 Hook의 활용과 Cache가 제대로 동작하지 않아 DB 조회를 줄이려는 의도가 동작하지 않습니다.
get_board_db()
함수 내의$cache[$key]
값을 항상 빈배열로 대체되어 cache가 활용되지 않음