# Caching Transient Contents in Vehicular Named Data Networking: A Performance Analysis
## 5 Caching Transient Contents in V-NDN
### Quantifying Cache Inconsistency Effects  
To quantify the cache inconsistency in an urban V-NDN environment, we performed a preliminary simulation campaign with ndnSIM [37]. We consider a first case, where nodes implement the legacy CEE+LRU scheme without applying the FP-Aware policy, and a second one where, instead, the FP-Aware policy is implemented. The simulation scenario is a Manhattan Grid of size 1 km\({}^{2}\) with 2 lanes per direction, where 100 vehicles move at speeds ranging between 20 and 40 km/h, according to the Simulation of Urban MObility (SUMO) model [38]. One RSU acting as the original producer of transient contents is deployed in the middle of the topology. Vehicles and RSU interact through the broadcast transmissions of Interest/Data packets, according to the V-NDN forwarding strategy in [21]. IEEE 802.11 is considered to be the access layer technology. We consider a catalog of 10,000 transient contents, each one composed of 100 1 kbyte-long Data packets. As with [16], we assume that nodes have the same storage space, which summed up accountsfor 1% of the overall content catalog size. We also assume that 20 vehicles are selected as consumers, and the content request pattern follows a Zipf distribution [39], which is commonly used to model content popularity in the current Internet, NDN networks and VANETs [33; 40; 41]. Given a catalog of content items, the Zipf distribution assumes that the access probability of the \(i^{th}\), \(1\leq i\leq m\), content item is represented as:  
\[P(i,\alpha,m)=\frac{1/i^{\alpha}}{\sum_{z=1}^{m}(1/z^{\alpha})} \tag{1}\]  
where the \(\alpha\) exponent, which is typically denoted as _skewness parameter_, characterizes the distribution popularity. The higher the value of \(\alpha\), the higher the number of requests concentrated on a few (popular) contents. In this simulation, we consider a skewness parameter \(\alpha\) equal to 1 or 2. Content requests start asynchronously: the time between two consecutive Interest transmissions for the first Data packet by different consumers is exponentially distributed with rate \(\lambda=0.3 request/sec\). Two distinct metrics are reported in this preliminary evaluation stage:  
* the _cache hit ratio_, computed as the ratio, in percentage, between the received Interests satisfied by the local CS and the total number of received Interests;
* the _cache inconsistency_, computed as the ratio, in percentage, between the received Data packets that were expired and the total number of received Data packets. Table 1 reports the results averaged over 15 runs, in presence of CEE+LRU, when considering a first case where all the Data packets have the \(FP\) set to 20s, and a second case where the parameter is set to 10s. It can be observed that, reasonably, the cache hit ratio largely increases when parameter \(\alpha\) passes from 1 to 2, since a larger number of requests are issued for the same popular contents. Not surprisingly, the lower the FP the higher the cache inconsistency, which can reach even 62.06% when \(\alpha=2\) and FP = 10s. This means that more than half of the cached Data packets are actually expired, but they are not removed from the CS, since the caching system is not able to recognize it, and only the LRU replacement policy applies. It is also worth noticing that the higher is \(\alpha\), the higher is the cache inconsistency, since the dissemination of stale cached packets is higher over the shared broadcast medium. Table 2 shows the cache hit ratio and inconsistency metrics, when instead considering the CEE+LRU+FP-Aware policy in the same scenario. Compared to Table 1, it can be observed that reported values are considerably lower. Indeed, thanks to the FP-Aware policy, the nodes can cache contents for a time equal to their FP and, when this latter expires, the packets are removed from the CS. As a result, compared to the previous case, the cache hit ratio is lower and the cache inconsistency reduces, although a not negligible percentage, in the range 3-9%, is still present.