We consider one essential performance metric of caching schemes based on two different coding techniques. A heterogeneous cache network is assumed, in which a server is connected through a shared link to two relays while there are not connection between the server and users. The number of users connected to each relay has a Poisson distribution. The memories in the first scheme are filled with encoded data while they are filled with uncoded data in the second scheme, and encoding of the content is utilized during the delivery phase. Knowing the popularity distribution of the files and the number of users, the goal is to calculate the average transmission rate of the shared link. However, we show here that this metric can be calculated in the general case of having a random number of users. In particular, a fundamentally different approach is needed, in which we employ the results of balls and bins (BAB) as a tool to solve these problems. We present firstly that this mapping has the advantage of an easy computation for an uncoded caching. We compare the schemes by characterizing the average transmission rate when the demands of users have the uniform and nonuniform distribution.