  We consider the classical coded caching problem as defined by Maddah-Ali and
Niesen, where a server with a library of $N$ files of equal size is connected
to $K$ users via a shared error-free link. Each user is equipped with a cache
with capacity of $M$ files. The goal is to design a static content placement
and delivery scheme such that the average load over the shared link is
minimized. We first present a class of centralized coded caching schemes
consisting of a general content placement strategy specified by a file
partition parameter, enabling efficient and flexible content placement, and a
specific content delivery strategy, enabling load reduction by exploiting
common requests of different users. For the proposed class of schemes, we
consider two cases for the optimization of the file partition parameter,
depending on whether a large subpacketization level is allowed or not. In the
case of an unrestricted subpacketization level, we formulate the coded caching
optimization in order to minimize the average load under an arbitrary file
popularity. A direct formulation of the problem involves $N2^K$ variables. By
imposing some additional conditions, the problem is reduced to a linear program
with $N(K+1)$ variables under an arbitrary file popularity and with $K+1$
variables under the uniform file popularity. We can recover Yu {\em et al.}'s
optimal scheme for the uniform file popularity as an optimal solution of our
problem. When a low subpacketization level is desired, we introduce a
subpacketization level constraint involving the $\ell_0$ norm for each file.
Again, by imposing the same additional conditions, we can simplify the problem
to a difference of two convex functions (DC) problem with $N(K+1)$ variables
that can be efficiently solved.
