Devices and methods for network-coded and caching-aided content distribution