def save(self, obj, usePipeline=True, forceID=False, cascadeSave=True, conn=None):
if conn is None:<EOL><INDENT>conn = self._get_connection()<EOL><DEDENT>if usePipeline is True:<EOL><INDENT>idConn = conn<EOL><DEDENT>else:<EOL><INDENT>idConn = self._get_new_connection()<EOL><DEDENT>if issubclass(obj.__class__, (list, tuple)):<EOL><INDENT>objs = obj<EOL><DEDENT>else:<EOL><INDENT>objs = [obj]<EOL><DEDENT>if usePipeline is True:<EOL><INDENT>pipeline = conn.pipeline()<EOL><DEDENT>else:<EOL><INDENT>pipeline = conn<EOL><DEDENT>oga = object.__getattribute__<EOL>if cascadeSave is True:<EOL>ignPipelines = OrderedDict()<EOL><INDENT>foreignSavers = {}<EOL>for thisObj in objs:<EOL><INDENT>if not thisObj.foreignFields:<EOL><INDENT>continue<EOL><DEDENT>foreignFields = thisObj.foreignFields<EOL>for foreignField in foreignFields:<EOL><INDENT>rawObj = oga(thisObj, str(foreignField))<EOL>if rawObj in (None, irNull) or not rawObj.isFetched():<EOL><INDENT>continue<EOL><DEDENT>foreignObjects = oga(thisObj, str(foreignField)).getObjs()<EOL>for foreignObject in foreignObjects:<EOL><INDENT>doSaveForeign = False<EOL>if getattr(foreignObject, '<STR_LIT>', None):<EOL><INDENT>if foreignObject.hasUnsavedChanges(cascadeObjects=True):<EOL><INDENT>doSaveForeign = True<EOL><DEDENT><DEDENT>else:<EOL><INDENT>doSaveForeign = True<EOL><DEDENT>if doSaveForeign is True:<EOL><INDENT>if foreignField not in foreignSavers:<EOL><DEDENT><DEDENT><DEDENT>foreignPipelines[foreignField] = self._get_new_connection().pipeline()<EOL><INDENT>foreignSavers[foreignField] = IndexedRedisSave(foreignObject.__class__)<EOL>
save - Save an object / objects associated with this model. 

You probably want to just do object.save() instead of this, but to save multiple objects at once in a single transaction, 
   you can use:

        MyModel.saver.save(myObjs)

@param obj <IndexedRedisModel or list<IndexedRedisModel> - The object to save, or a list of objects to save

@param usePipeline - Use a pipeline for saving. You should always want this, unless you are calling this function from within an existing pipeline.

@param forceID - if not False, force ID to this. If obj is list, this is also list. Forcing IDs also forces insert. Up to you to ensure ID will not clash.
@param cascadeSave <bool> Default True - If True, any Foreign models linked as attributes that have been altered
   or created will be saved with this object. If False, only this object (and the reference to an already-saved foreign model) will be saved.

@param conn - A connection or None

@note - if no ID is specified

@return - List of pks