Get the rifle out of the sun. You wouldn't think this helps, but it does.
Stand it on its butt with the muzzle pointed up. This creates a smokestack effect and helps heat escape the barrel.
If you can, turn a fan on it, or better yet, an air conditioner.