#NEWLINE# def clear_opts_related_cache( model_class ) : #NEWLINE# #INDENT# opts = model_class . _meta #NEWLINE# children = [ model_class . related_model for related_object in opts . __dict__ . get ( 'related_objects' , [ ] ) if related_object . parent_link ] #NEWLINE# opts . _expire_cache ( ) #NEWLINE# for child in children : #NEWLINE# #INDENT# clear_opts_related_cache ( child )