Mercurial > piecrust2
comparison piecrust/processing/base.py @ 371:c2ca72fb7f0b 2.0.0a8
caching: Use separate caches for config variants and other contexts.
* The `_cache` directory is now organized in multiple "sub-caches" for
different contexts.
* A new context is created when config variants or overrides are applied.
* `serve` context uses a different context that the other commends, to prevent
the `bake` command's output from messing up the preview server (e.g. with
how asset URLs are generated differently between the two).
* Fix a few places where the cache directory was referenced directly.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 03 May 2015 23:59:46 -0700 |
parents | f82262f59600 |
children | c4b3a7fd2f87 |
comparison
equal
deleted
inserted
replaced
370:a1bbe66cba03 | 371:c2ca72fb7f0b |
---|---|
130 assert app and out_dir | 130 assert app and out_dir |
131 self.app = app | 131 self.app = app |
132 self.out_dir = out_dir | 132 self.out_dir = out_dir |
133 self.force = force | 133 self.force = force |
134 | 134 |
135 tmp_dir = app.cache_dir | 135 tmp_dir = app.sub_cache_dir |
136 if not tmp_dir: | 136 if not tmp_dir: |
137 import tempfile | 137 import tempfile |
138 tmp_dir = os.path.join(tempfile.gettempdir(), 'piecrust') | 138 tmp_dir = os.path.join(tempfile.gettempdir(), 'piecrust') |
139 self.tmp_dir = os.path.join(tmp_dir, 'proc') | 139 self.tmp_dir = os.path.join(tmp_dir, 'proc') |
140 | 140 |