Mercurial > piecrust2
comparison piecrust/templating/jinja/extensions.py @ 858:58e28ba02fb7
refactor: Fix a few more pieces of code using the old APIs.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 08 Jun 2017 08:50:33 -0700 |
parents | 448710d84121 |
children | cedefb806bfd |
comparison
equal
deleted
inserted
replaced
857:d231a10d18f9 | 858:58e28ba02fb7 |
---|---|
126 [], [], body).set_lineno(lineno) | 126 [], [], body).set_lineno(lineno) |
127 | 127 |
128 def _cache_support(self, name, caller): | 128 def _cache_support(self, name, caller): |
129 key = self.environment.piecrust_cache_prefix + name | 129 key = self.environment.piecrust_cache_prefix + name |
130 | 130 |
131 exc_stack = self.environment.app.env.exec_info_stack | 131 rcs = self.environment.app.env.render_ctx_stack |
132 render_ctx = exc_stack.current_page_info.render_ctx | 132 rdr_pass = rcs.current_ctx.current_pass_info |
133 rdr_pass = render_ctx.current_pass_info | |
134 | 133 |
135 # try to load the block from the cache | 134 # try to load the block from the cache |
136 # if there is no fragment in the cache, render it and store | 135 # if there is no fragment in the cache, render it and store |
137 # it in the cache. | 136 # it in the cache. |
138 pair = self.environment.piecrust_cache.get(key) | 137 pair = self.environment.piecrust_cache.get(key) |