  Coded caching aims to minimize the network's peak-time communication load by
leveraging the information pre-stored in the local caches at the users. The
original single file retrieval setting by Maddah-Ali and Niesen has been
recently extended to general Scalar Linear Function Retrieval (SLFR) by Wan et
al., who proposed a linear scheme that surprisingly achieves the same optimal
load (under the constraint of uncoded cache placement) as in single file
retrieval. This paper's goal is to characterize the conditions under which a
general SLFR linear scheme is optimal and gain practical insights into why the
specific choices made by Wan et al. work. This paper shows that the optimal
decoding coefficients are necessarily the product of two terms, one only
involving the encoding coefficients and the other only the demands. In
addition, the relationships among the encoding coefficients are shown to be
captured by the cycles of certain graphs. Thus, a general linear scheme for
SLFR can be found by solving a spanning tree problem.
