Optimal coded caching under statistical QoS information