## 3 Problem Statement
### Calculating Data Freshness
The input features for the ANN included request frequency, data freshness, and historical cache hit ratios, which were generated and extracted from simulation scenarios using MATLAB. The network leveraged these features to identify patterns and trends in the data, facilitating more accurate predictions of system behavior. Training the ANN involved splitting the data into a training set (70% of the total data) and a validation set (30%), ensuring the model could generalize effectively to unseen data. Backpropagation with a mean squared error (MSE) loss function was used during training to iteratively minimize prediction errors, enhancing model accuracy over successive iterations. The RMSE metric was used to assess the ANN's performance, providing a quantitative measure of prediction accuracy. Lower RMSE values indicated the ANN's reliability in forecasting key outcomes, such as the likelihood of cache hits and delays. The ANN's role extended beyond predictions--it served as a baseline for comparison with the proposed caching method, especially in scenarios where predictive models could enhance decision making. Analyzing patterns in historical data, the ANN showcased the benefits of integrating machine learning techniques into caching systems. This highlights their capacity to anticipate system demands and enhance performance. The simulation results were assessed across three key performance metrics: cache hit ratio, network delay, and traffic load. Our proposed cache aging with learning (CAL) method was compared with two established techniques, the ANN and Variable Least Recently Used (VLRU) algorithms. Results indicate that under extended simulation durations and frequent, high-volume data requests, CAL outperformed the alternatives by effectively caching data while preserving their freshness. This contributed to reduced network delays and optimized traffic load. The findings underscore efficient cache management's importance in handling high-demand scenarios in networked environments, enhancing data availability and system responsiveness. However, if fewer requests are sent over longer intervals, the method's benefits are less noticeable. Therefore, we focused on scenarios with longer simulation times, higher request volumes, and shorter intervals, as shown in Table 3, where the results demonstrate the method's effectiveness in achieving our study's goals. However, the results also reveal that CAL's effectiveness compared to the ANN was insignificant in certain scenarios. Specifically, CAL showed marginal improvements in cases with lower request frequencies or longer intervals between requests. This is because CAL primarily focuses on real-time data freshness, which limits its adaptability to fluctuating traffic patterns. In contrast, the ANN's predictive modeling capabilities enable it to anticipate system demands and optimize cache decisions accordingly, giving it a distinct advantage in such scenarios. This performance gap can also be attributed to the static nature of CAL's cache aging mechanism. While CAL effectively prioritizes recently updated data, it lacks the flexibility to dynamically adjust its parameters based on observed trends or historical request patterns. Conversely, the ANN utilizes a dynamic learning process that continuously adapts its caching strategies as new patterns emerge. This allows the ANN to maintain a higher \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Simulation Mode** & **Simulation Time** & **Period Length** & **Number of Requests** \\ \hline
**Mode 1** & 3 h & 180 s & 3000 \\ \hline
**Mode 2** & 10 h & 120 s & 1000 \\ \hline
**Mode 3** & 3 h & 120 s & 3000 \\ \hline
**Mode 4** & 10 h & 120 s & 3000 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Simulation modes. cache hit ratio in environments with variable or unpredictable request frequencies as it can allocate resources more efficiently. Another contributing factor is the reliance of CAL on pre-defined thresholds for determining data freshness.