Cavitation during drying of a gel