comparison piecrust/page.py @ 876:d1095774bfcf

refactor: Fix some issues with record/cache entry collisions, add counters.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 15 Jun 2017 07:33:40 -0700
parents 9bb22bbe093c
children 1bb704434ee2
comparison
equal deleted inserted replaced
875:7169bf42ec60 876:d1095774bfcf
304 cache_data = { 304 cache_data = {
305 'config': config.getAll(), 305 'config': config.getAll(),
306 'content': json_save_segments(content)} 306 'content': json_save_segments(content)}
307 cache.write(cache_path, json.dumps(cache_data)) 307 cache.write(cache_path, json.dumps(cache_data))
308 308
309 app.env.stats.stepCounter('PageLoads')
310
309 return config, content, False 311 return config, content, False
310 312
311 313
312 segment_pattern = re.compile( 314 segment_pattern = re.compile(
313 r"""^\-\-\-\s*(?P<name>\w+)(\:(?P<fmt>\w+))?\s*\-\-\-\s*$""", 315 r"""^\-\-\-\s*(?P<name>\w+)(\:(?P<fmt>\w+))?\s*\-\-\-\s*$""",