# Performance Analysis of Cache Based on Popularity and Class in Named Data Network
## 3 Static-CAPIC: Cache Based on Popularity and Class with the Static Cache Proportion
### Mathematical Analysis for Static-CAPIC  
In this research, the term 'cache hit' is used to denote the number of requests for content that can be responded to by routers, and without asking it to the producer. Therefore, the router's ability to serve the request makes it more efficient. The term'missed request' is used to determine the number of requests that cannot be responded by the router. Meanwhile, the 'cache hit ratio' is a number of content requests in a cache that is successfully fulfilled, compared to the many requests it receives. The Cache Hit Ratio, \(CHR\), for content stores without partitions is obtained using the following formula:  
\[CHR=\frac{H}{H+M} \tag{2}\]  
where:  
\(H\) = number of hit requests,  
\(M\) = number of missed requests. The commonly used cache replacement techniques for NDN are Least Frequently Used (LFU) and Least Recently Used (LRU). According to a research carried out by [PERSON] et al. [3], LFU is the most effective cache replacement strategy for the network with request patterns following Zipf-Mandelbrot distribution. LFU is resilient to changes in the demand distribution (exponential factor in the Zipf distribution), while LRU responds poorly to Zipf's flatter distribution. The benefits of LRU are significant at higher values of the exponential factor, therefore this research discusses, analyzes, and elaborates on the content store conditions with and without partitioning using the cache replacement Least Frequently Used (LFU) technique. The research used parameter \(C\) as the size of content store in each router. To make it easier to analyze, \(C\) is used to determine the maximum number of the packet that can be stored in the content store. In the simple case of a system with content stores that only have a single content class and use an LFU algorithm, \(C\) number of content can be stored according to the content's popularity. Content store with a size \(C\) can cache the content ranking into \(1,2,3,...,C\). The hit probability is the probability of content that is requested available on the content store. The content that is cached in the LFU content store is according to the top ranking in popularity, and \(p\left(i\right)\) indicates the probability content \(i\) is requested by consumers, it can be written that the hit probability of content \(1\) is relatively the same as \(p\left(1\right)\), the hit probability of content \(2\) is relatively the same as \(p\left(2\right)\), the hit probability of content \(C\) is relatively the same as \(p\left(C\right)\). From (1) and (2), we can write cache hit ratio in content store with size C:  
\[CHR(C) = I\cdot\frac{p(1)+p(2)+p(3)+\ldots+p(c)}{l}\] \[CHR(C) = p(1)+p(2)+p(3)+\ldots+p(C)\]  
\[CHR(C)=\sum_{i=1}^{C}p(i) \tag{3}\]  
where  
\(C=\) size of the content store,  
\(p(i)=\) request probability for content \(i\),  
\(I=\) total number of interest from consumer. In the case of the content store with partitions, and according to content class, it is assumed that there are \(K\) service classes. Therefore there are \(K\) partitions in the content store.