Rearranging cache