equal
deleted
inserted
replaced
20 |
20 |
21 |
21 |
22 def wsgi_environ_cache(*names): |
22 def wsgi_environ_cache(*names): |
23 """Wrap a function/method to cache its result for call into request.environ |
23 """Wrap a function/method to cache its result for call into request.environ |
24 |
24 |
25 :param list[string] names: keys to cache into environ, the len(names) must |
25 :param [string...] names: keys to cache into environ; len(names) must |
26 be equal to the result's length or scalar |
26 be equal to the result's length or scalar |
27 :return: |
|
28 """ |
27 """ |
29 def decorator(fn): |
28 def decorator(fn): |
30 def function_wrapper(self, request): |
29 def function_wrapper(self, request): |
31 scalar = len(names) == 1 |
30 scalar = len(names) == 1 |
32 try: |
31 try: |