def make_method_key(model, method, key):
 prefix = 'method-cache'
 if isinstance(model, basestring):
  name = model
 else:
  name = (model.__name__ if hasattr(model, '__name__') else model.__class__.__name__)
 key = (make_key(**key) if isinstance(key, dict) else key)
 return u':'.join([prefix, name, method, key])

def make_method_key ( model , method , key ) : prefix = 'method-cache' if isinstance ( model , basestring ) : name = model else : name = ( model . __name__ if hasattr ( model , '__name__' ) else model . __class__ . __name__ ) key = ( make_key ( ** key ) if isinstance ( key , dict ) else key ) return u':' . join ( [ prefix , name , method , key ] )
creates a cache key for models method method .