hexojs / hexo-server

Server module for Hexo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caching possible?

rottmann opened this issue · comments

Every page view re-generate the .css file from a custom modified UIKit-scss files. This takes on each page view ~750ms.

Is it possible to pass options to hexo, so that hexo did not render the css file each time, only if scss files are modified?

When writing docs and view small changes, it is annoying to wait each time.

I extend middlewares/route.js quick&dirty with a simple memory stream cache. I will add an option to select which files to cache (with an regex) and create a pull request to extend hexo-server (if you want it?).
By default cache would be off.