Optimum Cache Design for Reducing P2P Traffic