shadow: release shadow cache before set device status to FINISHED