  We consider the caching of content in the mobile devices in a dense wireless
network using maximum distance separable (MDS) codes. We focus on an area,
served by a base station (BS), where mobile devices move around according to a
random mobility model. Users requesting a particular file download coded
packets from caching devices within a communication range, using
device-to-device communication. If additional packets are required to decode
the file, these are downloaded from the BS. We analyze the device mobility and
derive a good approximation of the distribution of caching devices within the
communication range of mobile devices at any given time. We then optimize the
MDS codes to minimize the network load under a cache size constraint and show
that using optimized MDS codes results in significantly lower network load
compared to when caching the most popular files. We further show numerically
that caching coded packets of each file on all mobile devices, i.e., maximal
spreading, is optimal.
