Mercurial > piecrust2
diff piecrust/commands/builtin/util.py @ 666:81d9c3a3a0b5
internal: Get rid of the whole "sub cache" business.
* Compute cache keys up front, so the cache directory is only chosen once.
* Buffer up config variants to apply before loading the config. Makes it
possible to cache variant-resulting configs, too.
* Make a factory class to reuse the logic that creates the `PieCrust` object
correctly for multi-process workers and such.
* Add a test.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 03 Mar 2016 08:22:41 -0800 |
parents | 3ceeca7bb71c |
children | 6e92b5cd0163 |
line wrap: on
line diff
--- a/piecrust/commands/builtin/util.py Thu Mar 03 08:19:28 2016 -0800 +++ b/piecrust/commands/builtin/util.py Thu Mar 03 08:22:41 2016 -0800 @@ -63,7 +63,7 @@ pass def run(self, ctx): - cache_dir = ctx.app.sub_cache_dir + cache_dir = ctx.app.cache_dir if cache_dir and os.path.isdir(cache_dir): logger.info("Purging cache: %s" % cache_dir) shutil.rmtree(cache_dir)