Dynamics of the foreshock compressional boundary and its connection to foreshock cavities