How much time does it take for a shop to restock caps?
The Vendors restock twice per week on Sunday and Wednesday. 72 and 96 hours respectively.
You might also need to be outside of the area the vendor is in.
If you sell stuff to a vendor so that the vendor has less caps than normal, AND buy something (doesn't matter what, a pencil should do), save, kill the vendor, and then reload the save, the vendor's caps should reset (not the pencil that you bought, though). However, this will not work if you don't buy anything, at least it didn't for me. I'm not sure how to get the item stock to reset, but I'm almost sure that it's something like what I wrote above. I tested this because just killing the vendor and reloading a save didn't work. It did when I tried buying something too.