summary refs log tree commit diff stats
path: root/examples/cgi
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-12-27 12:23:12 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-12-27 12:23:12 +0100
commit7b5448c755885d61b5213ad91ca95f630bbd6d28 (patch)
tree568c80a248e8e6e692edafc2adb8f6bc6cbc5f2f /examples/cgi
parenta74dfcfd00365e19757092e95933107d9e5adb7d (diff)
downloadNim-7b5448c755885d61b5213ad91ca95f630bbd6d28.tar.gz
introduce 'core' as an alias for 'compilerproc'
Diffstat (limited to 'examples/cgi')
0 files changed, 0 insertions, 0 deletions
;id=98bca305d5e053ccd624073e2c2ecac50640106f'>98bca305 ^
d894fd02 ^
dded3cb8 ^
d894fd02 ^


bedfed3d ^
d894fd02 ^


b3d031a9 ^
d894fd02 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

                                                                 
 
                                                                  
 
 
                         
              
 


                                     
                         


                               
                                                                            
                                
# This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.

from __future__ import (absolute_import, division, print_function)


def cached_function(fnc):
    cache = {}

    def inner_cached_function(*args):
        try:
            return cache[args]
        except Exception:
            value = fnc(*args)
            cache[args] = value
            return value
    inner_cached_function._cache = cache  # pylint: disable=protected-access
    return inner_cached_function