Mercurial > piecrust2
diff piecrust/baking/baker.py @ 45:efd0d3bacc9e
Don't recursively clean the cache.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 21 Aug 2014 23:09:31 -0700 |
parents | 9e058e221108 |
children | fce061f8c2ed |
line wrap: on
line diff
--- a/piecrust/baking/baker.py Thu Aug 21 22:52:18 2014 -0700 +++ b/piecrust/baking/baker.py Thu Aug 21 23:09:31 2014 -0700 @@ -254,7 +254,7 @@ # Load/create the bake record. record = TransitionalBakeRecord() - record_cache = self.app.cache.getCache('bake_r') + record_cache = self.app.cache.getCache('baker') record_name = (hashlib.md5(self.out_dir.encode('utf8')).hexdigest() + '.record') if not self.force and record_cache.has(record_name): @@ -328,11 +328,11 @@ reason = "templates modified" if reason is not None: - cache_dir = self.app.cache_dir + cache_dir = self.app.cache.getCacheDir('baker') if os.path.isdir(cache_dir): - logger.debug("Cleaning cache: %s" % cache_dir) + logger.debug("Cleaning baker cache: %s" % cache_dir) shutil.rmtree(cache_dir) - self.force = True + self.force = True logger.info(format_timed(start_time, "cleaned cache (reason: %s)" % reason)) else: