OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """ | 2 """ |
3 jinja2.bccache | 3 jinja2.bccache |
4 ~~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~~ |
5 | 5 |
6 This module implements the bytecode cache system Jinja is optionally | 6 This module implements the bytecode cache system Jinja is optionally |
7 using. This is useful if you have very complex template situations and | 7 using. This is useful if you have very complex template situations and |
8 the compiliation of all those templates slow down your application too | 8 the compiliation of all those templates slow down your application too |
9 much. | 9 much. |
10 | 10 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 def dump_bytecode(self, bucket): | 303 def dump_bytecode(self, bucket): |
304 args = (self.prefix + bucket.key, bucket.bytecode_to_string()) | 304 args = (self.prefix + bucket.key, bucket.bytecode_to_string()) |
305 if self.timeout is not None: | 305 if self.timeout is not None: |
306 args += (self.timeout,) | 306 args += (self.timeout,) |
307 try: | 307 try: |
308 self.client.set(*args) | 308 self.client.set(*args) |
309 except Exception: | 309 except Exception: |
310 if not self.ignore_memcache_errors: | 310 if not self.ignore_memcache_errors: |
311 raise | 311 raise |
OLD | NEW |