# Dynamic and Energy Efficient Cache Scheduling Framework for IoMT over ICN
## 3 Materials and Methods
### Proposed Framework
When users \(S1\) and \(S2\) send interest packets for content C1, which is a popularly cached item at the edge node, the concept of content popularity becomes evident. If another request arises for content C3 to be cached at the edge node, but the cache is full, C3 is directed to an intermediate caching node. This approach minimizes content replication within the network, ensuring efficient memory utilization and a reduction in bandwidth consumption. The proposed framework enhances three key caching parameters: cache hit ratio, network stretch, and latency. Edge nodes copy content from the publisher, with content lifetime specified upon publishing data. IoT data adheres to specific lifetimes, and require termination at some point in the network. Consequently, the implementation of DCS enhances network performance and reduces the network traffic load on the source node. Algorithm 1 is used to deploy the routing policy for checking the age of the content at the cache of the edge node. If the content is expired and removed from the cache, then new content is added to the cache, and age is defined for this content. Upon receiving the age of the caching node, a message is sent to the router for an update, i.e., if it is replaced by the replica, then add a new age to the incoming contents until it expires and is removed from the cache node. If space is not available at the cache of the edge node, then the content is passed to the higher threshold value towards the central position. The workflow of the popular content over the network shows that it is periodic, as when users request come for content that is popular over the network, CS is first checked. If the requested content is available locally, then the same is provided. Otherwise, the procedure checks the cached content at CS, a call to IRT is performed, and the content is provided to the user. If the content is not available, then it is shifted to PIT to check whether it is the same content requested by any other node. In  
case of the same content, the request with respect is removed. Another entry is made with respect to the current request, and data are provided to the desired request. In contrast, the FIB broadcasts the request for popular content. Figure 2: The architecture of the proposed system. The architecture presents the workflow of interest packets sent from biomedical sensor devices toward the cloud data source. Content producers and content consumers have caching nodes that cache the popular data for short lifetime. If the ordinary request comes over the network, it is forwarded to CS to check; if found, then it is sent to the consumer, or otherwise forwarded to PIT to check for any other entry in PIT. If it exists, then we discard the existing entry and add updated entry against this request; if data are not present, it is further sent to FIB to broadcast. ```
Input :Interest data item arrives at cache Output : Age of cache content
1 Remove expired content from the cache of node. 2 data_item arrives at intermediate node i
3 if(data_item is in cache)then
4 if(freshness_of_data_item<freshness_of_cached_data_item)then
5 refresh (cache)
6 add to cache_edge_node (data_item)
7 data_item_age = new_age (data_item)
8 forward_the_data_item to the next_hop's_node
9 else
10 data_item_age = new_age (data_item)
11 forward_the_data_item to the next_hop's_node
12 end if
13
14 elseif(node_cache has more space)then
15 cache (data_item)
16 new_age(data_item)
17 forward_the_data_item to the next_hop's_node
18 elseif(lifetime_data_item\(\geq\) caching threshold)then
19 while(node_cache_has_no_space)do
20 call LRU replacement policy
21 end if
22 cache (data_item)
23 forward_the_data_item to the next_hop's_node
24 else
25 forward_the_data_item to the next_hop's_node
26 end if
```  
**Algorithm 1**Receiving age of the IoMT data items at the caching nodes.