Skip to content

존재하지 않는 문서가 있을경우 캐싱을 하지 않도록 함#2196

Merged
1 commit merged into
xpressengine:developfrom
bjrambo:pr/document-cache
Jan 2, 2018
Merged

존재하지 않는 문서가 있을경우 캐싱을 하지 않도록 함#2196
1 commit merged into
xpressengine:developfrom
bjrambo:pr/document-cache

Conversation

@bjrambo

@bjrambo bjrambo commented Dec 19, 2017

Copy link
Copy Markdown
Contributor

rhymix/rhymix@92d8f17

서드파티에서 insertDocument 실행 이후 after트리거에서 documentModel::getDocument 를 실행할경우 document 값이 모두 비어있는 값으로 리턴되는 부분을 찾았습니다.

그래서 찾아본 원인이 board.Controller.php 에서 해당 게시글이 있는지 없는지를 검사하는 과정에서
https://github.com/xpressengine/xe-core/blob/master/modules/board/board.controller.php#L74

를 실행하고 있었으며, 해당 액션으로 인해 미리 빈값이 캐싱이 되어버렸습니다.

$GLOBALS['XE_DOCUMENT_LIST'][$document_srl] = $oDocument;

여기에 document 문서가 존재하지 않을경우 캐싱을 하지 않도록 하는 PR입니다.

이는 기진님께서 패치에 도움주셨으며, 전적으로 GPL v2, LGPL v2 듀얼라이선스를 책택하여 XE에서 적용할 수 있는 라이선스 코드입니다.

리뷰해주셔서 감사합니다 :)

@ghost ghost self-assigned this Dec 20, 2017
@ghost ghost added the type/bug label Jan 2, 2018
@ghost ghost added this to the 1.9-2018-02W milestone Jan 2, 2018
@ghost ghost merged commit 46e689e into xpressengine:develop Jan 2, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant