1. A method for transmitting data files in a network, comprising: receiving requests from destination devices for packets of the data files; constructing a conflict graph such that each packet requested by each destination device is represented by a distinct vertex in a plurality of vertices of the conflict graph, the plurality of vertices being associated with the destination devices; assigning labels to the plurality of vertices, each label being a set of indices denoting the destination devices requesting a packet and the destination device caches storing the packet; assigning levels to the plurality of vertices, each level indicating a number of the destination devices requesting the packet and a number of destination device caches storing the packet; ordering the plurality of vertices from vertices having a highest level to vertices having a lowest level; coloring the plurality of vertices based on the ordering; combining the packets represented by vertices in the plurality of vertices having a same color; and sending the combined packets.