Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cache): option for cache rendered content #3963

Merged
merged 1 commit into from Dec 16, 2019

Conversation

@SukkaW
Copy link
Member

SukkaW commented Dec 14, 2019

What does it do?

In #3756, @dailyrandomphoto disabled cache rendered content for generate and enabled for hexo s.

Enabling cache rendered content for hexo s will respond more quickly from second requests which is helpful when use hexo-server in production, but it also makes more difficult when developing theme or previewing other changes. So the config.server.cache is introduced in this PR. The documents for hexo-server will be updated after this PR is merged and released with hexo@4.3.

How to test

git clone -b server-development https://github.com/sukkaw/hexo.git
cd hexo
npm install
npm test

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.
@SukkaW SukkaW requested review from curbengh and dailyrandomphoto Dec 14, 2019
@coveralls

This comment has been minimized.

Copy link

coveralls commented Dec 14, 2019

Coverage Status

Coverage increased (+0.0008%) to 97.14% when pulling a4719b4 on SukkaW:server-development into 2c50d3b on hexojs:master.

1 similar comment
@coveralls

This comment has been minimized.

Copy link

coveralls commented Dec 14, 2019

Coverage Status

Coverage increased (+0.0008%) to 97.14% when pulling a4719b4 on SukkaW:server-development into 2c50d3b on hexojs:master.

@curbengh

This comment has been minimized.

Copy link
Contributor

curbengh commented Dec 15, 2019

Enabling cache rendered content for hexo s will respond more quickly from second requests which is helpful when use hexo-server in production, but it also makes more difficult when developing theme or previewing other changes.

This PR disable it by default though, shouldn't it be enabled for most users?

@SukkaW

This comment has been minimized.

Copy link
Member Author

SukkaW commented Dec 15, 2019

@curbengh

Most users and theme developers are using hexo-server as a live preview. Only few of them are using hexo-server to serve their website.

@curbengh curbengh changed the title refactor(cache): option for cache rendered content feat(cache): option for cache rendered content Dec 16, 2019
@curbengh

This comment has been minimized.

Copy link
Contributor

curbengh commented Dec 16, 2019

Possibly supersedes hexojs/hexo-server#76

@SukkaW SukkaW merged commit 499c2b6 into hexojs:master Dec 16, 2019
4 checks passed
4 checks passed
Travis CI - Pull Request Build Passed
Details
codeclimate All good!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
coverage/coveralls Coverage increased (+0.0008%) to 97.14%
Details
@curbengh curbengh mentioned this pull request Dec 19, 2019
1 of 2 tasks complete
@SukkaW SukkaW mentioned this pull request Dec 21, 2019
1 of 1 task complete
SukkaW added a commit to hexojs/hexo-server that referenced this pull request Dec 21, 2019
The feature is introduced in hexojs/hexo#3963
SukkaW added a commit to hexojs/hexo-server that referenced this pull request Dec 23, 2019
* docs(README): add description about cache

The feature is introduced in hexojs/hexo#3963

* docs(README): update cache description
oncletom added a commit to oncletom/hexo that referenced this pull request Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.