You should call QgsRasterLayer.triggerRepaint()
If your layer is called myLayer call
myLayer.triggerRepaint()
The same method exists for vector layers as well.
You should call QgsRasterLayer.triggerRepaint()
If your layer is called myLayer call
myLayer.triggerRepaint()
The same method exists for vector layers as well.