Module Expr Str Assign NameStore NameLoad Assign NameStore Dict FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body If UnaryOpNot NameLoad body Return Call NameLoad NameLoad NameLoad TryExcept body If NameLoad body Assign NameStore Call NameLoad TupleLoad SubscriptLoad NameLoad Slice Num Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad TupleLoad NameLoad Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Print Call NameLoad TupleLoad NameLoad NameLoad Assign NameStore NameLoad If UnaryOpNot NameLoad body Return Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Dict Index NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list Return NameLoad decorator_list
N/A N/A Holds memcache functions.
 N/A usecache False N/A _memcache_cache N/A memcache_decorator N/A N/A scope instance N/A False N/A N/A Caches function results in memory

    This is a pretty classic memoization system for plugins. There's
    no expiration of cached data---it just hangs out in memory
    forever.

    This is great for static rendering, but probably not for running
    as a CGI/WSGI application.

    This is disabled by default. It must be explicitly enabled
    to have effect.

    Some notes:

    1. the function arguments MUST be hashable--no dicts, lists, etc.
    2. this probably does not play well with
       non-static-rendering--that should get checked.
    3. TODO: the two arguments are poorly named--that should get fixed.

    :arg scope: string defining the scope. e.g. 'pycategories'.
    :arg instance: whether or not the function being decorated is
        bound to an instance (i.e. is the first argument "self" or
        "cls"?)
     _memcache N/A N/A fun N/A N/A _memcache_decorated N/A N/A N/A args kwargs N/A N/A N/A usecache N/A N/A N/A fun args kwargs N/A N/A N/A instance N/A N/A hash_key N/A hash N/A N/A args N/A 1 N/A frozenset N/A sorted N/A N/A kwargs items N/A N/A hash_key N/A hash N/A args N/A frozenset N/A sorted N/A N/A kwargs items N/A N/A N/A TypeError N/A N/A N/A repr N/A args kwargs N/A hash_key None N/A N/A hash_key N/A N/A N/A fun args kwargs N/A N/A N/A ret N/A N/A N/A _memcache_cache setdefault scope N/A N/A hash_key N/A N/A N/A KeyError N/A N/A ret N/A fun args kwargs N/A N/A N/A _memcache_cache N/A scope N/A hash_key ret N/A ret N/A N/A _memcache_decorated N/A N/A _memcache N/A