Mercurial > piecrust2
comparison piecrust/baking/baker.py @ 1050:e0796761cdcc
bake: Only cache templates for the default template engine.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 26 Jan 2018 18:02:07 -0800 |
parents | 7b64eb5bbc81 |
children | 971b4d67e82a |
comparison
equal
deleted
inserted
replaced
1049:c2bfa1869f0d | 1050:e0796761cdcc |
---|---|
205 "command was invoked with all pipelines filtered " | 205 "command was invoked with all pipelines filtered " |
206 "out. There's nothing to do.") | 206 "out. There's nothing to do.") |
207 return ppmngr | 207 return ppmngr |
208 | 208 |
209 def _populateTemplateCaches(self): | 209 def _populateTemplateCaches(self): |
210 for eng in self.app.plugin_loader.getTemplateEngines(): | 210 engine_name = self.app.config.get('site/default_template_engine') |
211 eng.populateCache() | 211 for engine in self.app.plugin_loader.getTemplateEngines(): |
212 if engine_name in engine.ENGINE_NAMES: | |
213 engine.populateCache() | |
214 break | |
212 | 215 |
213 def _bakeRealms(self, pool, ppmngr, record_histories): | 216 def _bakeRealms(self, pool, ppmngr, record_histories): |
214 # Bake the realms -- user first, theme second, so that a user item | 217 # Bake the realms -- user first, theme second, so that a user item |
215 # can override a theme item. | 218 # can override a theme item. |
216 # Do this for as many times as we have pipeline passes left to do. | 219 # Do this for as many times as we have pipeline passes left to do. |