I've never had a problem with the standard Nikon bayonet caps. The cheap, white, plastic ones go right into the trash.
A few years ago I bought a bulk package of generic/third-party rear caps from KEH. Of the 20 (?) caps in the package, maybe 2 or 3 were as good as the Nikon version.