(self, force_insert=False, force_update=False, using=None, update_fields=None)
存入数据库后，同时写入缓存
存入数据库后，同时写入缓存
存入数据库后，同时写入缓存
def save(self, force_insert=False, force_update=False, using=None, update_fields=None):
    '''存入数据库后，同时写入缓存'''
    self._ori_save(force_insert, force_update, using, update_fields)

    # 添加缓存
    key = MODEL_KEY % (self.__class__.__name__, self.pk)
    rds.set(key, self)
def save ( self , force_insert = False , force_update = False , using = None , update_fields = None ) : self . _ori_save ( force_insert , force_update , using , update_fields ) # 添加缓存 key = MODEL_KEY % ( self . __class__ . __name__ , self . pk ) rds . set ( key , self )