# HG changeset patch # User Ludovic Chabant # Date 1413703502 25200 # Node ID d31cbbdb4eccb30278b3cf7dc0f8d10d6996cae8 # Parent 208c652551a3e56944aee73762f5846bace017f2 Use cache paths that are easier to debug than hashes. diff -r 208c652551a3 -r d31cbbdb4ecc piecrust/page.py --- a/piecrust/page.py Thu Oct 16 17:03:42 2014 -0700 +++ b/piecrust/page.py Sun Oct 19 00:25:02 2014 -0700 @@ -209,7 +209,8 @@ def _do_load_page(app, path, path_mtime): # Check the cache first. cache = app.cache.getCache('pages') - cache_path = "%s.json" % hashlib.md5(path.encode('utf8')).hexdigest() + rel_path = os.path.relpath(path, app.root_dir) + cache_path = "%s.json" % rel_path.replace('/', '_').strip('_') page_time = path_mtime or os.path.getmtime(path) if cache.isValid(cache_path, page_time): cache_data = json.loads(cache.read(cache_path),