'Determine the function that computes a cache key from arguments.'

def determine_key(self):

    if (self.skiparg is None):
        args = formatargspec(*getargspec(self.method))[1:(-1)]
        if self.args:
            code = ('lambda    %s:    (%s,)' % (args, ',    '.join(self.args)))
        else:
            code = ('lambda    %s:    ()' % (args,))
        self.key = unsafe_eval(code)
    else:
        self.key = (lambda *args, **kwargs: args[self.skiparg:])
