Skip to main content
. 2021 Mar 26;21(7):2321. doi: 10.3390/s21072321
Algorithm2 A baseline algorithm for making a caching decision.
    Input    :M—size of total cache memory
                  U—size of used cache memory
                  benefit—map that stores caching benefit of the corresponding cluster
                  clusters—a set of clustered nodes
    Output: caches—a set of candidates to cache
1:function make_decision
2:       update(benefit))
3:       caches
4:       for all cluster in clusters do
5:              if UM then
6:                    caches caches{cluster.dataset}
7:                    update(benefit)
8:              end if
9:         end for
10:       return caches
11: end function