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

def determine_key(self):

    assert (self.skiparg is None), 'ormcache_context()    no    longer    supports    skiparg'
    spec = getargspec(self.method)
    args = formatargspec(*spec)[1:(-1)]
    cont_expr = ('(context    or    {})' if ('context' in spec.args) else 'self._context')
    keys_expr = ('tuple(map(%s.get,    %r))' % (cont_expr, self.keys))
    if self.args:
        code = ('lambda    %s:    (%s,    %s)' % (args, ',    '.join(self.args), keys_expr))
    else:
        code = ('lambda    %s:    (%s,)' % (args, keys_expr))
    self.key = unsafe_eval(code)
