Research Article

[Retracted] 5G-EECC: Energy-Efficient Collaboration-Based Content Sharing Strategy in Device-to-Device Communication

Algorithm 2

Cache design policy.
Input:
(i) Devices cache capacity
(ii) Threshold value for upgrading in-cache
(iii) number views of content
Output: Replacement of older content with a new one
Steps
(1)if Vn is in Ci
(2)  then
(3)  Hc++
(4)  NiVn++
(5)  if NiVn > Xi
(6)   then
(7)   Vn is set at the header of Ci
(8)  else
(9)   NiVn = 0
(10)   if Ci − 1 is not full
(11)    then
(12)    Vn is set at the header of Ci − 1//upgraded from bottom to top
(13)   else
(14)    LCi is set at the bottom of Ci//degraded from top to bottom
(15)    Ni1Vn1 = 0
(16)    Vn is set at the header of Ci− 1//upgraded from bottom to top
(17)    Hc++
(18)    NiVn++
(19)    Vn is set at the header of Ci
(20)   end if
(21)  end if
(22)else
(23)  Mc++
(24)  LCi is removed
(25)  Vn set header of Ci
(26)  NiVn++
(27) end if