Mercurial > piecrust2
diff piecrust/environment.py @ 111:208c652551a3
Quick fix for making the server correctly update referenced pages.
Disable the file-system cache for rendered segments when in server mode. We
can bring this optimization back when we're actually using the baking record
in the server too in order to know dependencies.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 16 Oct 2014 17:03:42 -0700 |
parents | 0445a2232de7 |
children | 371a6c879ab9 |
line wrap: on
line diff
--- a/piecrust/environment.py Thu Oct 16 08:19:02 2014 -0700 +++ b/piecrust/environment.py Thu Oct 16 17:03:42 2014 -0700 @@ -115,11 +115,14 @@ self.was_cache_cleaned = False self.page_repository = MemCache() self.rendered_segments_repository = MemCache() + self.fs_caches = { + 'renders': self.rendered_segments_repository} self.base_asset_url_format = '%uri%' def initialize(self, app): - cache = app.cache.getCache('renders') - self.rendered_segments_repository.fs_cache = cache + for name, repo in self.fs_caches.items(): + cache = app.cache.getCache(name) + repo.fs_cache = cache class StandardEnvironment(Environment):