def inner(self, *args, **kwargs):
    dic = self.result_cache
    cache_key = None
    if (dic is not None):
        cache_key = (args, tuple(kwargs.items()))
        try:
            result = dic.get(cache_key)
        except TypeError as e:
            log.debug('Switchboard result cache not active for this "%s" check due to: %s within args: %s', args[0], e, repr(cache_key)[:200])
            cache_key = None
        else:
            if (result is not None):
                return result
    result = func(self, *args, **kwargs)
    if (cache_key is not None):
        dic[cache_key] = result
    return result
def inner(self, *args, **kwargs):
    dic = self.result_cache
    cache_key = None
    if (dic is not None):
        cache_key = (args, tuple(kwargs.items()))
        try:
            result = dic.get(cache_key)
        except TypeError as e:
            log.debug('Switchboard result cache not active for this "%s" check due to: %s within args: %s', args[0], e, repr(cache_key)[:200])
            cache_key = None
        else:
            if (result is not None):
                return result
    result = func(self, *args, **kwargs)
    if (cache_key is not None):
        dic[cache_key] = result
    return result