  Several network communication problems are highly related such as coded
caching and distributed computation. The centralized coded caching focuses on
reducing the network burden in peak times in a wireless network system and the
coded distributed computation studies the tradeoff between computation and
communication in distributed system. In this paper, motivated by the study of
the only rainbow $3$-term arithmetic progressions set, we propose a unified
framework for constructing coded caching schemes. This framework builds bridges
between coded caching schemes and lots of combinatorial objects due to the
freedom of the choices of families and operations. We prove that any scheme
based on a placement delivery array (PDA) can be represented by a rainbow
scheme under this framework and lots of other known schemes can also be
included in this framework. Moreover, we also present a new coded caching
scheme with linear subpacketization and near constant rate using the only
rainbow $3$-term arithmetic progressions set. Next, we modify the framework to
be applicable to the distributed computing problem. We present a new
transmission scheme in the shuffle phase and show that in certain cases it
could have a lower communication load than the schemes based on PDAs or
resolvable designs with the same number of files.
