Fluid flows in microchannels with cavities