I found a way to achieve, what I think is what you want, using the Transparency depth output of the Light Path node.
For this to work, you need to create to new materials for you object:
Material 2 is assigned to the front face, and Material 1 to everything else on the cube. The back cube and the floor have a different material assigned.
The Light Path node gives your material information about the current ray that is being cast through your scene (Cycles casts virtual light rays through the scene for physically correct rendering). The Transparency depth for the ray increases every time this ray passes through a transparent shader (the front face of the cube in this example). Now we can pass that information into a mix shader to control make the material transparent for light rays, that already passsed through a transparent layer.
Please note, that any transparency in the scene will affect Material 1, making it invisible. If you want to make a different object disappear, just assign Material 1 to it and you can use a transparent object to hide parts of it.
There are obviously a couple of things to tweak about this setup, but I think it's a start.