## 2 System Model
### Problem Formulation  
In this subsection, we formulate our delay objective function. Whenever a user needs content, it first checks its own cache resource. If the desired content is available, the request is fulfilled without delay. If the desired content is not available in user's own cache, then it requests the desired content from the proximal UE within D2D range. If the desired content is available in the cache of a neighboring UE, it can be provided to the content demanding UE by leveraging mmWave-based D2D communication link. The number of sets of UE lying within the D2D communication range of content demanding UE \(n\) is represented by \(\mathrm{Y}_{n}\), which is expressed as  
\[\mathrm{Y}_{n}=\{v\in\mathcal{U}:\|n-v\|\leq R_{D2D}\}, \tag{8}\]  
where \(\|\cdot\|\) denotes the Euclidean distance between content sender UE \(v\) and content receiver UE \(n\), and \(R_{D2D}\) denotes the D2D communication range. But, if the desired content is also not available in the cache of neighboring UE, then the UE \(n\) sends its request to the serving SBS. If the demanded content is cached by the serving SBS, the request is fulfilled immediately; otherwise, the content is fetched from the core network by the serving SBS and forwarded to the data-requesting UE. In this work, we focus on a two-tier caching mechanism. We define a binary decision variable \(e_{n}^{m}\). If UE \(n\) caches content \(m\), \(e_{n}^{m}=1\); otherwise, it equals 0. We define another decision variable \(y_{n}^{m}=\cup_{v\in\mathrm{Y}_{n}}e_{v}^{m}\) to determine whether the desired content \(m\) of UE \(n\) is available or not in the neighborhood or adjacent content set. The data request probability of UE \(n\) is defined by \(p(m|n)\), which follows \(p_{m}\) as determined in Equation (1). Hence, the probability of UE \(n\) obtaining content \(m\) via a D2D link is determined by  
\[\chi_{m}=\frac{1}{N}\sum_{n=1}^{N}{(1-y_{n}^{m})p_{m}}. \tag{9}\]  
The delay of D2D communication is determined as follows:  
\[D_{D2D}=\sum_{m=1}^{M}{(p_{m}-\chi_{m})d_{D2D}}, \tag{10}\]  
where \(d_{D2D}\) denotes the data delivery delay between two sets of UE exploiting D2D communication. If the content cannot be obtained within a certain delay threshold \(T_{D}\), the request is sent to the serving SBS. When the demanded content is cached by the serving SBS, UE can then download the content via mmWave- or \(\mu\)Wave-based cellular access link rates denoted by \(R_{mm}\) or \(R_{\mu}\), respectively. The total time slots required to successfully receive content \(m\) is evaluated as  
\[T=\arg\min\biggl{\{}T:R_{T}\geq\frac{|f_{m}|}{\Delta t}\biggr{\}}, \tag{11}\]  
where \(\Delta t\) represents the duration of one complete time slot. For ease of comprehension, the transmission rate through mmWave or \(\mu\)Wave transmission link is denoted by \(R_{T}\). Thus, the serving SBS containing the desired content incurs a certain delay while transmitting data to the UE, which is evaluated as  
\[D_{i}=\frac{|f_{m}|}{\mathbb{E}[R_{T}]}, \tag{12}\]  
where \(R_{T}\) denotes the transmission rate (either in mmWave or \(\mu\)Wave mode) between data transmitter and receiver. In order to obtain the delay of obtaining content \(m\) from the core network, we designate it with \(D_{c}\), which is derived as\[D_{c}=D^{\prime}+\frac{|f_{m}|}{\mathbb{E}[R_{T}]}, \tag{13}\]  
where \(D^{\prime}\) represents the content delivery delay incurred within the internet, and its value depends on the network congestion. Subsequently, a decision variable \(x_{im}\) is defined to determine availability of content \(m\) in the cache of SBS \(i\). If \(x_{im}=1\), it means the desired content \(m\) is available in the cache of SBS \(i\); otherwise, it equals 0. Hence, the data delivery delay is evaluated as  
\[D=D_{D2D}+\sum_{m=1}^{M}\tau_{m}(x_{im}D_{i}+(1-x_{im})D_{c}), \tag{14}\]  
Our main objective is to minimize the network delay subject to the cache capacity constraints of both the serving SBS and UE.