diff piecrust/cache.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 474c9882decf
children 7d2fdf43d7ca
line wrap: on
line diff
--- a/piecrust/cache.py	Thu Aug 21 22:52:18 2014 -0700
+++ b/piecrust/cache.py	Thu Aug 21 23:09:31 2014 -0700
@@ -32,6 +32,9 @@
                     self.caches[name] = c
         return c
 
+    def getCacheDir(self, name):
+        return os.path.join(self.base_dir, name)
+
 
 class SimpleCache(object):
     def __init__(self, base_dir):
@@ -72,6 +75,7 @@
         cache_dir = os.path.dirname(cache_path)
         if not os.path.isdir(cache_dir):
             os.makedirs(cache_dir, 0o755)
+        logger.debug("Writing cache: %s" % cache_path)
         with codecs.open(cache_path, 'w', 'utf-8') as fp:
             fp.write(content)