Optimal strategies for popular content placement and delivery