## 3 Problem Statement
### QoS Formula  
The cache hit rate metric shows how well a caching system performs by calculating the percentage of requests fulfilled directly from the cache rather than fetching data from slower storage [22; 31]. A higher cache hit rate usually means quicker data access, less delay, and better Quality of Service (QoS) by reducing the strain on backend resources [32]. A high cache hit rate in network systems can also lower bandwidth usage because data are retrieved locally from the cache instead of repeatedly pulling from the main source. Optimizing cache hit rates is crucial for applications requiring rapid data access, such as content delivery networks (CDNs) and real-time data processing in IoT systems [33]. Effective caching algorithms, like the proposed method in your simulations, aim to maximize cache hits over time, outperforming traditional methods like LRU under various operational conditions. Equation (1) is used to calculate the cache hit rate:  
\[\textit{Cache Hit Rate}=\frac{\textit{Number of Cache Hits}}{\textit{Total Number of Requests}} \tag{1}\]  
Number of cache hits refers to the successful instances where the requested data were found in the cache. The total number of requests is the overall number of requests made during the simulation period. Network delay (D) represents the time taken for data to travel from the source to the destination across a network, affecting the overall response time in networked systems [31]. High network delays can result from long transmission paths, heavy network traffic, or processing delays at intermediate nodes. Reducing network delay is essential for applications requiring low-latency communication, including real-time video streaming, IoT systems, and online gaming. Effective caching mechanisms, such as the proposed method in your simulations, help lower network delay by reducing the need for frequent data retrievals from the source. Caching frequently accessed and up-to-date data enables the network to achieve faster response times and improve QoS, outperforming traditional caching approaches, such as LRU. Equation (2) was used to evaluate the delay [34]:  
\[D=T_{rtt}+T_{proc}+T_{queue}+T_{trans} \tag{2}\]  
\(T_{rtt}\), measured in milliseconds (ms), represents the round-trip time delay for data to travel to and from the source. \(T_{proc}\), in milliseconds (ms), denotes the processing time at each network node or router. \(T_{queue}\) is the queuing delay for packets waiting to be processed or transmitted and \(T_{trans}\) is the transmission time for data across the network. Traffic load (TL) measures the volume of data or requests that pass through a network over a certain period, reflecting network demand and potential congestion. High traffic load can strain network resources, resulting in slower response times and increased packet loss, which negatively impacts QoS [35]. Caching frequently requested data closer to users reduces traffic load as fewer requests need to reach the original data source, alleviating network burden. In the simulations, the proposed caching method reduced traffic load more effectively than the LRU algorithm by serving additional requests from intermediate caches. This decrease in traffic improves network efficiency, saves bandwidth, and lowers latency, which is beneficial for applications needing quick data access and minimal delay. Traffic load was calculated by Equation (3):  
\[TL=\frac{\textit{Total Number of Requests}\times\textit{Data Size per Request}}{\textit{Simulation Time}} \tag{3}\]  
Root mean square error (RMSE) is a standard metric for measuring the accuracy of predictive models by showing the average difference between predicted and actual values [36]. It is calculated by finding the square root of the average of squared differences between observed and predicted values, keeping the result in the same units as the original data. A lower RMSE indicates more accurate predictions.