A method implemented by a first wireless device configured to communicate with a second wireless device, the method comprising: determine to cache a first file of a plurality of files based at least in part on maximizing a mean logarithm utility of the second wireless device, wherein the mean logarithm utility is based at least in part on: a probability of the second wireless device associating with the first wireless device to request the first file from the first wireless device comprising: A i 0 = P E i 0 = ρ 0 + 1 − p i ρ 1, where, and p i = ∑ F ∈ F i K p F a probability of the second wireless device associating with a network node to request the first file from the network node comprising: A F, i 1 = P E F, i 1 = p F ρ 1.; or - a first mean logarithm utility of the second wireless device associating with the first wireless device comprising: U ̅ F, i 1 = log η 1 μ λ 1 q F ρ 1 − 2 T ρ 1 2 p F A F, i 1 γ − 2 + log log 1 + T.; and a second mean logarithm utility of the second wireless device associating with a network node comprising: U ̅ i 0 = log η 0 μ λ 0 1 − p 1 ∑ j = 1 N q j p j − 2 T 1 − 1 − ρ 0 2 p i γ − 2 A i 0 + log log 1 + T.; and (d) the method further comprises receiving a spectrum allocation based at least in part on the maximizing of the mean logarithm utility, wherein the caching of the first file of the plurality of files and the spectrum allocation is based at least in part on a caching metric, wherein the caching metric is the wireless device determining to cache the first file of the plurality of files and receiving the spectrum allocation if the caching metric is a positive value, and the wireless device determining not to cache the first file of the plurality of files and not receiving the spectrum allocation if the caching metric is a non-positive value. a probability of the second wireless device associating with the first wireless device to request the first file from the first wireless device comprising: A i 0 = P E i 0 = ρ 0 + 1 − p i ρ 1, where, and p i = ∑ F ∈ F i K p F a probability of the second wireless device associating with a network node to request the first file from the network node comprising: A F, i 1 = P E F, i 1 = p F ρ 1.; or - a first mean logarithm utility of the second wireless device associating with the first wireless device comprising: U ̅ F, i 1 = log η 1 μ λ 1 q F ρ 1 − 2 T ρ 1 2 p F A F, i 1 γ − 2 + log log 1 + T.; and - a first mean logarithm utility of the second wireless device associating with the first wireless device comprising: U ̅ F, i 1 = log η 1 μ λ 1 q F ρ 1 − 2 T ρ 1 2 p F A F, i 1 γ − 2 + log log 1 + T. a second mean logarithm utility of the second wireless device associating with a network node comprising: U ̅ i 0 = log η 0 μ λ 0 1 − p 1 ∑ j = 1 N q j p j − 2 T 1 − 1 − ρ 0 2 p i γ − 2 A i 0 + log log 1 + T.; and (d) the method further comprises receiving a spectrum allocation based at least in part on the maximizing of the mean logarithm utility, wherein the caching of the first file of the plurality of files and the spectrum allocation is based at least in part on a caching metric, wherein the caching metric is the wireless device determining to cache the first file of the plurality of files and receiving the spectrum allocation if the caching metric is a positive value, and the wireless device determining not to cache the first file of the plurality of files and not receiving the spectrum allocation if the caching metric is a non-positive value. the wireless device determining to cache the first file of the plurality of files and receiving the spectrum allocation if the caching metric is a positive value, and the wireless device determining not to cache the first file of the plurality of files and not receiving the spectrum allocation if the caching metric is a non-positive value.