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 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.

@coveralls
Copy link

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
Copy link

Coverage Status

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

@curbengh
Copy link
Contributor

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
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
Copy link
Contributor

Possibly supersedes hexojs/hexo-server#76

@SukkaW SukkaW merged commit 499c2b6 into hexojs:master Dec 16, 2019
@SukkaW SukkaW mentioned this pull request Dec 21, 2019
1 task
SukkaW added a commit to hexojs/hexo-server that referenced this pull request Dec 21, 2019
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
thom4parisot pushed a commit to thom4parisot/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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants