Green PVC is better then white. The green stuff has a life expectancy of around 800 years, buried and full of sewage. Yep, that last part is correct, the green stuff is sewage pipe. So be sure to get it new and not used.
One end cap does not need to be glued on. To make that seal, use heavy duty water proof wheel bearing grease for boat trailers. Boat trailer wheel bearing grease is designed to be submerged in water. Spread it around the outside of the pipe on the end that the cap will not be glued on. Spread it on thick, as the cap goes on it will push the extra in front of the cap, building up a bead of grease.
The end cap that is not glued on, you will have to have some kind of vent hole, or the caps will not stay on, the compressed air will push the caps back off. Use something like a 3/32 drill bit to drill the vent hole, then plug with water proof, heavy duty wheel bearing grease.
Once the cap is on all the way, leave that bead of grease on the edge of the cap and wrap it with duct tape. Its important that the layer of grease stay around the edge of the cap. This will help seal it and protect the extra grease from being wiped away as you handle the tube.
If you bury the tube vertically, cut a round disk out of plywood that will slide into the pipe, use a 2X4 to make a 6 – 8 inch long spacer and another disk. Use dry wall screws and secure a disk to each end of the 2X4. Slide the disk into the tube and make sure there is a string tied to it. Drill a 1/8 – 3/16 hole in the top disk and secure the string to the disk. This way you can just grab the string, pull the disk up and remove the contents – instead of having to dig up the entire pipe.
To get the cap off, you will have to break the seal on the vent hole, or you will create a vacuum when the caps are pulled off. Thus making it impossible to remove the caps. A 12 inch pvc pipe will have about a 3 – 4 inch straight flange on the end cap. The most my buddy and I were able to move the cap was 1/2 inch – 1 inch (if that). Then we had to break the seal on the vent hole.
One thing my buddy and I talked about, but never tested:
drill a 7/16 hole in the middle of the cap
use a 1/4 inch pipe tap and tap the hole so it has threads
thread a 1/4 inch galvanized pipe nipple into the hole – be sure to use teflon tap.
install a brass valve on the end of the nipple.
Once the air is out of the pipe, close the valve. When you are ready to remove the cap, open the valve to allow air back into the tube.