Closed robertpi closed 4 years ago
Shouldn’t it also invalidate cache when the generator file is changed?
Oh yeah, I was only thinking about the build mode where it runs and exits. I'll take another look at the the watch mode.
Supports cache invalidation in watch mode now.
We probably could go even further than this and invalidate cache only in some particular cases (invalidate all when config or any loader has changed, invalidate single entry when the generator has changed. ). But even this is great, thanks a lot!
I thought about that, and agree it would be a better solution I didn't do it for two reasons:
Next logical step for better perf, for watch mode at least, is calculating which files have changed and just regenerating them.
Small change, order of magintude improvement. Tested on 185 page blog:
Pre-change - Generation time: 00:04:59.3250690 Post-change - Generation time: 00:00:19.2490206