<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Fresh Caching of Dynamic Content Over the Wireless Edge</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2022 October</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10385066</idno>
					<idno type="doi">10.1109/TNET.2022.3170245</idno>
					<title level='j'>IEEEACM transactions on networking</title>
<idno>1558-2566</idno>
<biblScope unit="volume">30</biblScope>
<biblScope unit="issue">5</biblScope>					

					<author>B. Abolhassani</author><author>J. Tadrous</author><author>A. Eryilmaz</author><author>E. Yeh</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We introduce a framework and provably-efficient schemes for 'fresh' caching at the (front-end) local cache of content that is subject to 'dynamic' updates at the (back-end) database. We start by formulating the hard-cache-constrained problem for this setting, which quickly becomes intractable due to the limited cache. To bypass this challenge, we first propose a flexible time-based-eviction model to derive the average system cost function that measures the system's cost due to the service of aging content in addition to the regular cache miss cost. Next, we solve the cache-unconstrained case, which reveals how the refresh dynamics and popularity of content affect optimal caching. Then, we extend our approach to a soft-cacheconstrained version, where we can guarantee that the cache use is limited with arbitrarily high probability. The corresponding solution reveals the interesting insight that 'whether to cache an item or not in the local cache?' depends primarily on its popularity level and channel reliability, whereas 'how long the cached item should be held in the cache before eviction?' depends primarily on its refresh rate. Moreover, we investigate the cost-cache saving trade-offs and prove that substantial cache gains can be obtained while also asymptotically achieving the minimum cost as the database size grows.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>The recent advances in the development of capable smart wireless devices and mobile internet services have resulted in rapidly escalating levels of data traffic over cellular networks. This surging data demand is depleting the limited spectrum resources for wireless transmission, especially over the wireless connection between the base stations and the end-users. Consequently, wireless resources are becoming scarce due to the tremendous development of throughputhungry applications including video streaming and online gaming <ref type="bibr">[1]</ref>, <ref type="bibr">[2]</ref>. Thus, more sophisticated resource management strategies are needed to meet the growing demand <ref type="bibr">[2]</ref>.</p><p>One possible approach to tackle this problem is to cache popular contents at the users' site to reduce the total response time to data requests. Content Distribution Networks (CDNs) utilize a large mesh of caches to deliver content from locations closer to the end users <ref type="bibr">[3]</ref>, <ref type="bibr">[4]</ref>. Existing caching strategies rely on the assumption of static (or quasi-static) nature of the stored content <ref type="bibr">[5]</ref>, <ref type="bibr">[6]</ref>, <ref type="bibr">[7]</ref> and <ref type="bibr">[8]</ref>. In many real-world scenarios, such as news updates in social networks and system state updates in cyber-physical networks, the data content is subject to updates at various rates, which render the older versions of the content less useful <ref type="bibr">[9]</ref>, <ref type="bibr">[10]</ref>. Hence, there is a growing need to develop new caching strategies that account for the refresh characteristics and ageing costs of content for efficient dynamic-content distribution.</p><p>Broadly speaking, there are two classes of caching policies for studying the system performance: timer-based, i.e., Time-To-Live (TTL) <ref type="bibr">[11]</ref>, <ref type="bibr">[12]</ref> and non-timer-based caching policies. In the latter case, the strongly coupled nature of the eviction policies render exact analysis difficult. In contrast, a TTL cache policy associates each content with a timer upon placement in the cache. The content is then evicted once the timer expires, independent of other cached contents. Due in part to analytical tractability <ref type="bibr">[11]</ref>, <ref type="bibr">[13]</ref>, TTL caches have been widely employed since the early days of the internet with the Domain Name System (DNS) being an important application <ref type="bibr">[14]</ref>. Recently, TTL caching strategies have received renewed attention, mainly because they enable a general analytical approach which is used to model replacement-based caching policies such as Least Recently Used (LRU) <ref type="bibr">[15]</ref>.</p><p>Using the TTL cache refresh framework for dynamic content, <ref type="bibr">[16]</ref> proposes two metrics to measure the cached content freshness: age of synchronization (AoS) and age of information (AoI). Most existing research regarding the freshness of the local cache focuses on the AoI metric which was first examined in the 1990s in studies on real-time databases <ref type="bibr">[17]</ref>, <ref type="bibr">[18]</ref>.</p><p>The problem of refreshing cache contents from an AoI perspective was first formulated in <ref type="bibr">[19]</ref>, where a remote server generates multiple files and transmits them to a local cache. The authors assume that each file has its own request popularity, a factor that affects how often the server should update the file contained in cache. The objective is to minimize the average AoI <ref type="bibr">[20]</ref>. In <ref type="bibr">[21]</ref>, the authors formulate the AoI problem for a system with random transmission and service processes. They show that the age decreases with increasing service rate. Nevertheless, this comes at the cost of increased waste in the resources spent on obsolete packets <ref type="bibr">[22]</ref>. Najm et al. <ref type="bibr">[23]</ref> analyze the average age and average peak of AoI under the gamma distributed service time. Sun et al. <ref type="bibr">[24]</ref> study how to optimally manage the freshness of information using AoI metric and under a general age penalty function to show that a zero-wait policy does not always minimize the age. Kam et al. <ref type="bibr">[25]</ref> propose a dynamic model in which the rate of requests depends on the popularity and the freshness of information to minimize the number of missed packet requests.</p><p>While AoI is a meaningful metric for measuring the freshness of content in some systems, there are many real-world scenarios where a content does not lose its value simply because time has passed since it was cached. These types of dynamic contents include news and social network updates where the users prefer to have the most fresh version but so long as there is no new update, that content is considered to be the most fresh version <ref type="bibr">[26]</ref>, <ref type="bibr">[27]</ref>. Furthermore, our proposed model can be applied to a wide range of scenarios where items can be considered as categories. For example, consider the category of the most popular video on youtube. New videos are constantly being generated and they may replace the current most popular video. Thus, the content of the most popular video can be thought of as dynamic content. In these scenarios, so long as there is no new update, the current version is considered fresh independent of the time passed since its generation.</p><p>In this work, we use a new freshness metric called Age-of-Version (AoV) which counts the integer difference between the versions at the database and the local cache. We also introduce a new cost function for dynamic content caching which captures both the cost due to the miss event and the cost due to content freshness <ref type="bibr">[28]</ref> which grows with the AoV metric. Moreover, our model extends the traditional caching paradigm to allow for varying generation dynamics of content, and calls for new designs that incorporate these dynamics into its decisions.</p><p>In particular, we propose a freshness-driven caching model for dynamic content which accounts for the update rate of data content and provides an analysis of the average operational cost for both the constrained and unconstrained cache sizes. We aim to reveal the effect of popularity and refresh rate on the optimal caching policies. This work was partially presented in 2021 IEEE International Conference on Computer Communications (INFOCOM). In the current version, we extend the model to include channel failure and investigate the effect of channel reliability on caching decisions. Our contributions, along with the organization of the paper, are as follows.</p><p>&#8226; In Section II, we present a novel caching model for serving dynamic content to end users from a back-end source and formulate the general problem of determining the cache holding times. &#8226; In Section III, we attack the generally intractable problem for the special and insightful case when there is no cache constraint, i.e., all items can be stored in the cache. We characterize the optimal caching decision and explicitly identify the optimal holding time of each item in terms of its popularity and its refresh rate, which reveals the balance between the fetching cost of a fresh update and the ageing cost of serving an old version.</p><p>&#8226; In Section IV, we return to the general cost minimization problem with high-probability guarantee of the cache size constraint to propose an asymptotically optimal caching solution. The solution reveals the interesting fact that, for fresh caching of dynamic content, one should select the items to cache based on their popularities, while determining the holding times of the cached items based on their refresh rates. &#8226; In Section V, we contrast the operational cost and average cache occupancy of the constrained cache with their counterparts in the unconstrained problem to demonstrate the potential of the proposed caching strategy and reveal the trade-off between the rate of convergence and cache size saving. The results show that the asymptotically optimal solution presented in Section IV can yield significant cache savings by discarding static items that are not sufficiently popular, and using the limited cache space efficiently for sufficiently popular dynamic and static items. In Section VI, the trade-off is investigated through numerical simulations. Finally, we conclude the work in Section VII.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. SYSTEM MODEL</head><p>We consider the generic hierarchical setting depicted in Fig. <ref type="figure">1</ref> whereby the (limited) local cache serves a user population that generate content requests according to a popularity distribution; while the back-end database receives updates to update the content with different rates. Next, we will provide the details of this generic model, followed by the goal of our work. Demand Dynamics: We assume that a set N of N unitsize data items (with dynamically changing content) is being served to a user population by the hierarchical caching system in Fig. <ref type="figure">1</ref>. In particular, requests arrive to the local cache according to a Poisson process 1 with rate &#946; &#8805; 0, which captures the request intensity of the user population. An incoming request targets data item n &#8712; N with probability p n . Accordingly, the probability distribution p = (p n ) N n=1 captures the popularity profile of the data items. Generation Dynamics: At the database, each data item may receive updates to replace its previous content. We assume that data item n receives updates according to a Poisson process with rate &#955; n &#8805; 0. Note that &#955; n = 0 captures the traditional case of static content that never receives an update. We denote the vector &#955; = (&#955; n ) N n=1 as the collection of update rates for the database. Age Dynamics: Since the data items are subject to updates at the database, the same items in the local cache may be older versions of the content. To measure the freshness of local content, we define the age &#8710; n (t) &#8712; {0, 1, . . .} at time t of a cached content for item n as the number of updates that the locally available item n has received in the database since it has been most recently cached. We name this freshness metric as the Age-of-Version (AoV), since it counts the integer difference between the versions at the database and the local cache.</p><p>Fig. <ref type="figure">2</ref> illustrates an example evolution of &#8710; n (t) for data item n under an arbitrary holding and eviction policy. At the instant t n,i , the local cache refreshes its content of data item n for the i th time. This item remains in the local cache for a duration of &#964; n,i &#8712; R + units of time. In this sample path, the item is evicted from the local cache at time instance t &#8242; n,i = t n,i + &#964; n,i . During the interval t &#8712; [t n,i , t &#8242; n,i ), the AoV &#8710; n (t) of item n grows according to a Poisson process with rate &#955; n , as governed by the aforementioned generation dynamics. At the eviction instant t &#8242; n,i , the &#8710; n (t) drops to zero by default since the next request for the item that arrives after a random duration (denoted as R n,i+1 in the figure) will be serving a fresh update from the database.</p><p>Within the subsequent evictions t &#8242; n,i and t &#8242; n,i+1 of the item n, we refer to the interval (t &#8242; n,i , t n,i+1 ] as the miss phase, since the incoming request is not in the local cache and must be fetched from the database at a higher cost; and the interval (t n,i , t &#8242; n,i ] as the hit phase, since the incoming request is served from the local cache, but possibly with a positive AoV value &#8710; n (t). Fetching and Ageing Costs: Now that we have the dynamics defined, we can introduce the key operational and performance costs associated with our caching system. On the operational side, we denote the cost of fetching an item from the database to the local cache by c f &gt; 0. On the performance side, we assume that serving an item n from the local cache with age &#8710; n (t) incurs a freshness/age cost of c a &#215; &#8710; n (t) for some c a &#8805; 0, which grows linearly<ref type="foot">foot_1</ref> with the AoV metric. This ageing cost measures the growing discontent of the user for receiving an older version of the content she/he demands. Channel Failure: Due to the unreliability of the wireless transmission, fetching attempts from database are not always successful. Therefore upon each fetching failure, re-fetching will be attempted after a deterministic time duration of q time units. We assume a transmission attempt over the wireless medium is successful with probability r &gt; 0 and is independent of other transmission attempts. Upon each cache miss, a fetching attempt is carried out to supply the requested item from the database. If such fetching attempt fails, the database will wait for a deterministic time q before performing another fetching attempt. For every time unit q that a request will be waiting to be served, a waiting cost c m is incurred. Note that, while a request of item n is waiting to be served, more requests for the same item n may arrive. Such requests will add to the waiting cost, since more requests are waiting to be served. One single successful fetch of the most fresh version of item n will be enough to serve all the waiting requests of item n. Problem Statement: Our broad objective in this work is to develop efficient caching and eviction strategies for the above setting that optimally balance the trade-off between the cost of frequently updating local content and the cost of providing aged content to the users. In particular, we are interested in provably cost-minimizing caching-and-eviction strategies that account for both the demand and the generation dynamics in order to optimally utilize a possibly limited cache space B &#8712; [0, &#8734;] at the local cache. We can express this goal generically as</p><p>where C &#960; represents the mean of the combined fetching and ageing cost of the system, and X &#960; n (t) &#8712; {0, 1} is the indicator that item n is in the local cache under the operation of a feasible policy &#960;. In its full generality, the feasible policy space &#928; can contain any policy that decides on its fetching and eviction decisions at time t with the knowledge of the cache content until time t and the generation/demand dynamics<ref type="foot">foot_2</ref> (&#955;, &#946;, p), but not the ages {&#8710; n (t)} n (since that information depends on the updates occurring at the backend database). Outline of our Approach and Results: The generic problem in (1) falls under the scope of Partially Observable Markov Decision Processes (POMDP), and quickly becomes intractable <ref type="bibr">[29]</ref>. Even formulating the problem explicitly, let alone solving it, becomes practically impossible. Therefore, a more productive approach is needed to attack this problem in order to develop algorithms and principles with performance guarantees. In this work, we propose such an approach whereby we: (i) first study the unconstrained version of the problem where B = &#8734; in Section III, which reveals how the caching and eviction decisions must depend on the generation and demand dynamics; and then (ii) extend our approach to a constrained version in Section IV, where we can guarantee that the B &lt; &#8734; cache limit can be satisfied with arbitrarily high probability as the database size N increases. This approach is not only productive in designing of policies with asymptotically optimal and cachespace efficient, but also reveals new and explicit metrics (cf.  of content in terms of its popularity and refresh rates.</p><p>Throughout the paper, we use cache to refer to the cache size available in the local server.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. OPTIMAL CACHING FOR DYNAMIC CONTENT WITHOUT CACHE CONSTRAINTS</head><p>In this section, we attack the generally intractable problem in (1) for the special and insightful case when there is no cache constraint, i.e., B = &#8734;. The characterization of the optimal caching decision in this section under this unconstrained setting will not only yield interesting insights about the impact of the generation dynamics, but will also form the basis of our approach to handling the cache-constrained case with high probability guarantees in Section IV.</p><p>We start by noting that the relaxation of the constraint decouples the problem into finding the optimal fetching and eviction decisions for each data item n independently. This is obvious once we note that the contribution of each item to the average cost is independent of the others. This motivates us in this setting to focus on a space of policies T with random holding times, defined next.</p><p>Definition 1 (Policy Space T ): T denotes the space of policies with random holding times, where a policy &#964; &#8712; T is defined by N (non-negative-valued) random variables (&#964; n ) N n=1 , representing the holding times of the items after their last fetching. In particular, the policy &#964; = (&#964; n ) N n=1 operates as follows for each item n &#8712; N : (i) if item n is not in the local cache when it is requested at time t, a fresh version of it is fetched from the database (miss cost incurred) and served to the user; (ii) at the time of successful fetching of item n into the local cache, a random holding time is generated (independently from previous realization of holding times) with respect to the distribution of &#964; n , and item n is held in the queue for the duration of the generated &#964; n value, at which time it is evicted from the local cache; (iii) if item n is in the local cache when it is requested at time t, it is served (with age-of-version cost of c a &#8710; n (t)) to the user.</p><p>The space T takes advantage of the decoupling of the caching decisions between items as well as possesses the flexibility to adapt to different generation and demand dynamics of data items. The next lemma explicitly characterizes the average cost and average cache size of such a policy &#964; &#8712; T in terms of the first and second moments of the holding time distributions of the policy &#964; .</p><p>Finally, since the following quantities appear consistently in the paper, for the sake of simplicity of notation, we define new parameters here.</p><p>A</p><p>Cmiss</p><p>(3)</p><p>We refer the curious readers to the proof of Lemma 1 on how these parameters were formed. The intuition behind these parameters is that A n (r) is a measure of the effective arrival request rate for item n to the database which is an increasing function of the channel reliability r. Average cost of cache miss per each miss event of item n is reflected in Cmiss n (r) that decreases as channel becomes more reliable. Their product, M (p n , r), is a measure of the average miss cost rate of item n which for a given p n is a decreasing function of the channel reliability r and for a given r is an increasing function of the item popularity p n . For a fully reliable channel with r = 1,</p><p>and B(&#964; ), respectively, denote the average cost and the average cache occupancy when the policy &#964; &#8712; T is implemented for the caching system without cache constraints at the local cache. Then,</p><p>where (&#955;, &#946;, p) are the system model parameters (cf. Section II) and (&#964; n ) n are the random variables describing the policy &#964; (c.f. Definition 1).</p><p>Proof. Please refer to Appendix A. The explicit characterization of the cost under Lemma 1 allows us to pose the problem of finding the cost minimizing policy in this setting as:</p><p>where the minimization is performed over all distributions for the holding times (&#964; n ) n with non-negative ranges, and the tuple (&#955;, &#946;, p) indicates that the solution is a function of these system parameters. For brevity, we will occasionally omit these parameters and refer to the optimal cost as C * , and later on we will also use C * (N ) when we study the scaling of the performance as the database size N grows.</p><p>The following theorem fully solves <ref type="bibr">(7)</ref>. Theorem 1: Policy &#964; * &#8712; T that solves ( <ref type="formula">7</ref>) is given by:</p><p>where D = {n &#8712; N | &#955; n &gt; 0} , and S = {n &#8712; N | &#955; n = 0} = N \D are, respectively, the set of dynamic and static data items. Then, the corresponding optimal average cost is given by:</p><p>Also, the average cache occupancy under &#964; * is given by:</p><p>Proof. First we show that the average system cost given in ( <ref type="formula">5</ref>) is minimized when the variable &#964; n is a constant, &#8704;n. For a random variable &#964; n with expectation E[&#964; n ], in order to minimize the cost, the second moment E[&#964; 2 n ] should be minimum. Since the variance var 2 which is a constant random variable. In calculating <ref type="bibr">(5)</ref> we assumed that steady state distribution exists for the given random variable &#964; n . Now we verify it for the constant random variable &#964; n . Recall that X n (t) &#8712; {0, 1} is the indicator that item n is in the local cache at time t.</p><p>Lemma 2: For a constant random variable &#964; n , the Bernoulli process (X n (t), t &#8805; 0) has a limiting hit probability given by:</p><p>Proof. Bernoulli process (X n (t), t &#8805; 0) is a semi-Markov process and is also irreducible. According to Fig. </p><p>exists and is independent of the initial state. Furthermore, the limiting hit probability h n (&#964; ) is given by: <ref type="bibr">(2)</ref>. This completes the proof of Lemma 2.</p><p>The cost minimization problem for the unconstrained cache can thus be expressed as:</p><p>The objective function has the form of quadratic over linear ratio, which is convex. Using KKT conditions gives the optimal solution for &#964; * in <ref type="bibr">(8)</ref>. Substituting &#964; * in (5) gives the optimal cost of (9).</p><p>To prove the optimal average cache occupancy <ref type="bibr">(10)</ref>, substituting the optimal solution (8) in the definition of average cache occupancy given in Lemma 1 and noting that &#964; * n = &#8734;, &#8704;n &#8712; S, we obtain n&#8712;S</p><p>Theorem 1, under the unconstrained cache setting, provides some useful insights about the nature of the optimal caching strategy for dynamic content: (i) we see that the cost minimizing policy &#964; * selects a fixed holding time for each item n rather than any other random choice; (ii) more interestingly, (8) explicitly characterizes the optimal holding time of each dynamic item n in terms of its popularity p n and its refresh rate &#955; n and channel reliability r in order to strike the optimal balance between the fetching cost of a fresh update and the ageing cost of serving an old version; (iii) It also shows that holding times decrease as the wireless channel becomes more reliable or item becomes less popular (since M (p n , r) is a decreasing function of r for a given p n and an increasing function of p n for a given r); (iv) less interestingly, we also see that any static item is cached forever under this unconstrained setting since it is never necessary to update it once it is fetched; and (v) it explicitly characterizes the average cache occupancy of &#964; * in terms of system parameters.</p><p>In the next section, we will build upon this foundation to return to a soft-constrained version of the problem (1).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. ASYMPTOTICALLY-OPTIMAL CACHING FOR DYNAMIC CONTENT WITH CACHE CONSTRAINTS</head><p>Returning to the general cost minimization problem given in (1), the instantaneous cache size constraint with B &lt; &#8734; entails a dependence between the optimizing items' holding time. With such a dependence, the optimization (1) suffers from the curse of dimensionality and has no tractable solution. In this section, we bypass this challenge by replacing the deterministic-constraint N n=1 X &#960; n (t) &#8804; B, at all times t, to a probabilistic-constraint where cache size limit has to be met with (arbitrarily) high probability over time. In particular let us introduce the following probabilistic version of <ref type="bibr">(7)</ref>:</p><p>for any arbitrarily small &#948; &gt; 0, where Xn (&#964; ) is the steadystate fraction of time that item n is held in the cache under policy &#964; . Such probabilistic approaches to solving deterministic problems are used increasingly frequently and fruitfully in learning and optimization domains. Solving this high-probability variation of the hard problem, in turn, provides a means to operate the original system efficiently with arbitrarily high probability.</p><p>Despite its softer statistical form, solving ( <ref type="formula">12</ref>) is still complicated by the need to design with guarantees in the tail distribution of its cache use. To tackle this challenge, pose the following average-cache-constrained problem with a flexible choice of cache size bound B &#8712; [0, &#8734;) :</p><p>where B(&#964; ) is the average cache occupancy under the policy &#964; that is explicitly characterized in <ref type="bibr">(6)</ref>. We note that this problem is non-convex since the constraint set {&#964; : B(&#964; ) &#8804; B} is non-convex. Nevertheless, the approach in the rest of the section is to first solve the non-convex problem (13) for any given B, and then choose a particular B as a function of the given B &lt; &#8734; and &#948; &gt; 0 in order to guarantee the probabilistic constraint in <ref type="bibr">(12)</ref>. Accordingly, we first provide the solution of (13) in the next theorem. Theorem 2: Policy &#964; * = (&#964; * n ) n &#8712; T that solves ( <ref type="formula">13</ref>) is given by deterministic &#964; * n &#8805; 0, &#8704;n, and &#945; * &#8805; 0 satisfying:</p><p>where [z] + = max(0, z), and</p><p>where D and S are, respectively, the set of dynamic and static data items defined in Theorem 1.</p><p>Proof. In the proof of Theorem 1, we showed that in order to minimize the cost, the random variable &#964; n should be a constant. Also, Lemma 2 shows that for such a constant random variable &#964; n , the Bernoulli process (X n (t)) t has a steady-state distribution whose average is given by <ref type="bibr">(21)</ref>.</p><p>Therefore the assumptions to calculate the average cost and average cache occupancy given in ( <ref type="formula">5</ref>) and ( <ref type="formula">6</ref>) hold and the optimization problem (13) can be rewritten as:</p><p>This is not a convex optimization problem. However, we take the following approach to solve it. Define the feasible set F B as:</p><p>which is a non-convex set. Then the cost optimization problem ( <ref type="formula">13</ref>) can be expressed as:</p><p>For any optimization problem min &#964; &#8712;F C(&#964; ) as it is given in <ref type="bibr">[31]</ref>, if all the following hold: 1) Slater condition, 2) non degeneracy assumption for &#8704;&#964; &#8712; F , 3)</p><p>Lemma 3: Optimization problem ( <ref type="formula">16</ref>) satisfies all the above four necessary conditions. Proof. (Lemma 3) Please refer to Appendix B.</p><p>Therefore, the non-trivial KKT solution to the problem (16) would be a global minimizer. Such a solution can be expressed as:</p><p>where &#945; * &#8805; 0 and &#956; * n &#8805; 0 are the optimal Lagrange multipliers which satisfy all the following KKT conditions:</p><p>Accordingly, for dynamic data items, n &#8712; D, with &#955; n &gt; 0, we have:</p><p>while for static data items, n &#8712; S, with &#955; = 0, we have: The form of the optimal solution in ( <ref type="formula">14</ref>) reveals the interesting insights that, for dynamic content n &#8712; D: whether to cache an item depends on the channel reliability and whether the item is sufficiently popular (in particular, whether p n &#8822; &#945; * &#946;c f for r = 1); and how long a cached item will remain in the cache before eviction depends on its refresh rate &#955; n as characterized in <ref type="bibr">(14)</ref>. It can also be seen that, for the same system parameters (&#955;, &#946;, p), as the average cache limit B decreases, then the optimal &#945; * that solves ( <ref type="formula">14</ref>) and (15) will increase. Then, for both static and dynamic content, the popularity threshold &#945; * /(&#946;c f ) of perfect wireless channel for caching or not caching the content increases to make sure only sufficiently popular items are cached. Now that we solved the average-cache-constrained problem <ref type="bibr">(13)</ref>, we are ready to connect it to the probabilistic problem <ref type="bibr">(12)</ref> with the following proposition.</p><p>Proposition 1: For any finite B &gt; 0 and arbitrarily small &#948; &gt; 0, there exits</p><p>such that the solution &#964; * (&#948;) of ( <ref type="formula">13</ref>) for B = B(&#948;) satisfies</p><p>Proof. (Proposition 1) Notice Xn (&#964; ), &#8704;n &#8712; N are independent Bernoulli random variables. We define a new random variable Y N (&#964; ) = N n=1 Xn (&#964; ), which is the sum of N independent Bernoulli random variables and is known to have a Poisson Binomial distribution. Also using the linear property of expectation and given that E[ Xn (&#964; )] = h n (&#964; ), we have:</p><p>.</p><p>For the random variable Y N with Poisson Binomial distribution, using the Chernoff bound we have:</p><p>Then to guarantee P (Y N &#8804; B) &#8805; 1 -&#948;, we have:</p><p>In this equation, setting &#948; to the form &#948;</p><p>Proposition 1 provides an explicit means of using the tractable problem <ref type="bibr">(13)</ref> to find efficient feasible solutions to the problem <ref type="bibr">(12)</ref>. To glean an insight on the structure of B(&#948;), suppose that m = 1 and &#948; = e -B/e , which is very small for sufficiently large B. Then, we have B(&#948;) = Be -1 .</p><p>In the next section, we will study the cost and cache occupancy performance merits of the proposed approximate optimization of (12) for large databases, which is commonly the case in content distribution networks. In particular, we will introduce the variable 0 &#8804; m(N ) &#8804; N as the number of most popular items that will remain in the cache after being fetched for the optimized holding times from <ref type="bibr">(14)</ref>. The remaining N -m(N ) items will never be cached, i.e., will only be fetched and served upon a user request and not cached. Then we will examine the cost-cache trade-off for this proposed strategy under the fully reliable channel to show its desirable characteristics.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. COST AND CACHE SPACE PERFORMANCE ANALYSIS</head><p>To establish the performance merits or the proposed approximate solution (&#964; * , &#945; * ) given in ( <ref type="formula">14</ref>) and ( <ref type="formula">15</ref>), we contrast the operational cost and average cache occupancy of the approximate problem <ref type="bibr">(13)</ref> with its counterpart of the unconstrained problem <ref type="bibr">(7)</ref> in the asymptotic regime as the number of data items, N , grows.</p><p>We expose the dependence of the relevant quantities on N to highlight its impact on the analysis as follows. We denote the optimal cost and average cache occupancy of <ref type="bibr">(7)</ref>, respectively, by C * (N ) and B * (N ), whereas the cost and average cache occupancy of the proposed approximate problem <ref type="bibr">(13)</ref> are denoted by C &#945;(N ) and B &#945;(N ), where the superscript &#945; indicates the dependence of these values to the &#945; parameter that is optimized in ( <ref type="formula">14</ref>) and ( <ref type="formula">15</ref>) for a given cache bound. Here, &#945; &#8805; 0 is a flexible parameter that allows us to explore the trade-off between the cost and the cache occupancy. Note that C * (N ) = C * (&#955;, &#946;, p) in ( <ref type="formula">9</ref>) and B * (N ) = B(&#964; * ) in <ref type="bibr">(10)</ref>. In addition, we consider a full reliable channel, i.e., r = 1, to give insights on the nature of the trade-off. Under a fully reliable channel,</p><p>&#946;p n c f . Therefore , according to Lemma 1, the average cost and cache occupancy for a fully reliable channel are given by:</p><p>where (&#964; &#945;, &#945;) satisfies ( <ref type="formula">14</ref>) and ( <ref type="formula">15</ref>) for a given &#945; &#8805; 0 with the appropriate choice of B &#945; as the corresponding cache limit in <ref type="bibr">(12)</ref>.</p><p>As the number of data items N grows, both the set of static items, S, and/or the set of dynamic items, D, grow in size accordingly, yet at different rates with N . Nevertheless, by the definition of D in Theorem 1, we can guarantee a minimum content update rate &#955; min &gt; 0 for all the items n &#8712; D for any number of data items N . That is, &#955; min = inf n&#8712;D &#955; n &gt; 0, &#8704;n &#8712; N .</p><p>Further, for any given &#945; &#8805; 0, we define the set of popular items in the approximate problem <ref type="bibr">(13)</ref>, P &#945;, as</p><p>to contain all the items that should be held in the cache after being fetched from the back-end database since ( <ref type="formula">14</ref>) implies:</p><p>It is worth noting that, if &#945; = 0, then P &#945; = N and all data items are considered popular which collapses to the case of the unconstrained cached size optimization <ref type="bibr">(7)</ref>. The last step before stating the asymptotic gains of the proposed policy is to divide the set of static items into two disjoint subsets. A subset S &#945; of static items that are popular, i.e., S &#945; = S &#8745;P &#945;, and a subset S &#945; = S -S &#945; of static unpopular items.</p><p>The following theorem jointly establishes the asymptotic optimality of the proposed approximate policy together with characterizing the cost-cache size trade off.</p><p>Theorem 3: For a given &#945; &#8805; 0, consider the policy &#964; &#945; that solves <ref type="bibr">(12)</ref> for a corresponding average cache bound B &#945; and average cost C &#945;. Let m(N ) = |P &#945;| denote the number of sufficiently popular items that will be cached under &#964; &#945; policy such that P &#945; is defined in <ref type="bibr">(17)</ref>.</p><p>then: lim</p><p>(ii) (Cost-cache Size Trade off) For a given database size</p><p>), the rate of convergence is at least:</p><p>the average cache saving is lower bounded by:</p><p>and the average cache occupancy B&#945; (N ) is bounded by:</p><p>Proof. Please refer to Appendix C. Theorem 3 reveals the potential of our proposed caching strategy which chooses items for caching based on their popularity and then incorporates the update rate of contents to decide how long each item should remain in the cache before eviction. Our proposed caching strategy completely discards the unpopular items, static or dynamic. More specifically, not caching the unpopular static items yields a very large gain on the cache saving side at a marginal loss on the average system cost side.</p><p>Theorem 3 shows that while the proposed strategy is asymptotically optimal for large data base sizes, it can also result in massive cache savings. This reveals that a cache size that grows with the rate of popular static items can achieve the same performance of having unconstrained cache size with the data base size being very large. As such, increasing the cache size beyond the threshold which is given as an upper bound in Theorem 3 will not reduce the average system cost for large data base sizes.</p><p>In the special scenario where the static items are unpopular for the given popularity measure &#945;, i.e., S &#8745; P &#945; = &#981;, Theorem 3 reveals that a bounded cache size of &#946;c f ca&#955;min can be asymptotically optimal and achieve the same average cost of a system with unconstrained cache size, even if the database size grows to infinity. Specifically, our proposed strategy is asymptotically optimal while massively reducing the cache occupancy to a constant cache size which does not grow with N .</p><p>Notice that the average cache occupancy for the unconstrained cache is not necessarily bounded by the order of popular static items. Not only does our proposed caching scheme achieve the same average cost of the system with unconstrained cache asymptotically but it also maintains a cache size which does not grow linearly with N . In other words, intelligently choosing the items to cache is a critical factor to optimize the average system cost in dynamic caching. If the popularity of static items is low, then caching only dynamic items considerably reduces the system's cost and attains remarkable cache space savings.</p><p>According to Theorem 3, m(N ) determines the trade off between how much cache storage is saved and how fast the cost converges to the optimal. Larger m(N ) will result in a faster convergence but a smaller cache saving gain. We will investigate this trade-off thoroughly in the following section.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VI. NUMERICAL RESULTS</head><p>The analytical results obtained in this paper are validated through numerical simulations in this section. In the following, we investigate the effects of item popularity and refresh rates alongside the channel uncertainty on the cost and cache gains of the proposed constrained caching strategy with that of the unconstrained cache. We set the number of data items to N = 1000, unless otherwise stated. We let the data item's popularity be p n = c/n z with z = 1 which is Zipf distributed with parameter z = 1. The refresh rates are captured according to &#955; n = &#955;, &#8704;n &#8712; N with &#955; = 1. Moreover, the normalized costs of fetching, waiting and aging are considered to be c f = 1, c m = 0.5 and c a = 0.1, respectively and &#946; = 5 is the arrival request rate. We also assume that cache space for the constrained caching strategy and channel reliability are B = 50 and r = 0.9, unless otherwise stated.</p><p>To emphasize the cache-cost trade-off, we adopt the percentage cost increase and cache saving of our proposed caching strategy for the constrained cache to the optimal solution derived for the unconstrained cache as our performance metric. Such metrics are defined as:</p><p>Note that our proposed caching strategy for the constrained cache aims to achieve a close to optimal cost with Fig. <ref type="figure">3</ref>: Cost increase and cache saving trade-off Fig. <ref type="figure">4</ref>: Cost increase and cache saving trade-off a limited cache space. As such, the defined cost increase metric is always positive and the defined cache change metric is always negative. A negative cache change shows the percentage of cache space saved by the proposed algorithm.</p><p>Fig. <ref type="figure">3</ref> shows the percentage cost increase and cache saving as a function of the wireless channel uncertainty. According to the figure, as the wireless channel becomes more reliable, the cost of the proposed constrained caching strategy converges to the optimal cost while the cache space saving decreases. Also, the figure shows that for highly unreliable wireless channels, the proposed constrained caching strategy can greatly save in the cache spaces (more than 80% cache saving) without sacrificing that much on the cost side (around 20% cost increase). In other words, the proposed constrained caching strategy is very effective in saving cache spaces while also maintaining a close to optimal cost of the unconstrained case.</p><p>Fig. <ref type="figure">4</ref> shows the percentage cost increase and cache saving as functions of the Zipf parameter for the popularity distribution. According to the figure, as items become more predictable, i.e., z increases, the cost of the proposed constrained caching strategy converges to the optimal cost while potentially saving in the cache spaces. When items are highly predictable (z &gt; 2 here), the optimal caching strategy without cache constraint will use less than B = 50 cache space that is set for the constrained caching strategy. Therefore both strategies are the same. On the other hand, as items become less predictable, the proposed caching strategy results in great cache saving without considerable loss on the Fig. <ref type="figure">5</ref>: Cost increase and cache saving trade-off Fig. <ref type="figure">6</ref>: Cost increase and cache saving trade-off cost side. In particular, if an item's popularity is according to a Zipf distribution with parameter close to z = 1.5, there is great cache saving without a noticeable cost increase.</p><p>Fig. <ref type="figure">5</ref> shows the percentage cost increase and cache saving as a function of the item's refresh rate. According to the figure, as items become highly dynamic, for example &#955; &gt; 7 for our choice of parameters, both the unconstrained caching strategy and the optimal caching strategy are the same. In other words, the optimal caching strategy is using less than B = 50 cache space available for the constrained caching strategy. On the other hand, for less dynamic items, the proposed caching strategy results in great cache saving while achieving a substantially close-to-optimal cost. This shows that as long as items are not highly dynamic, the proposed caching strategy is very effective at saving cache spaces without sacrificing in the cost.</p><p>Fig. <ref type="figure">6</ref> shows the percentage cost increase and cache saving as functions of the refresh rate's distribution. In particular, we have assumed refresh rates are weighted according to &#955; n = &#955; 0 /n q , &#8704;n &#8712; N with &#955; 0 = 1. We consider the Zipf distribution with parameter z = 1 for item's popularity. According to the figure, when q is largely negative (i.e., q &lt; -0.5 in our case), the proposed constrained caching policy with a limited cache capacity B = 50 achieves almost the same cost of the unconstrained case with almost the same cache occupancy. This is due to the fact that when q &lt; 0, items that are popular will have lower refresh rates. This simplifies the caching decision to cache the most popular item. Moreover, since items with lower popularities have Fig. <ref type="figure">7</ref>: Rate of convergence and cache saving trade-off higher refresh rates, by not caching such unpopular items, cost is only slightly increased with huge gains on the cache occupancy. On the other hand, if q &gt; 0, popular items will also have higher refresh rates. Therefore, in caching popular items we should also consider the trade-off between their popularity and refresh rates. According to the figure, as q increase, the optimal unconstraned caching policy will occupy more cache space, since it cannot afford to not cache the popular items or items with lower refresh rates. Therefore, as q increase, the constrained caching policy with limited cache capacity will lose more on the cost side and the unconstrained caching will occupy more caches.</p><p>To make the trade-off even more clear, we consider the full reliable wireless channel. As stated in the Theorem 3, we assume m(N ) = N b , 0 &lt; b &#8804; 1 to be the number of most popular items that will be considered for caching and also assume |S &#945;| = N 0.5 is the number of static items which are not in the popular set. According to Theorem 3, the sufficient condition for asymptotic optimality is b &gt; 1  2 . For such a choice of m(N ) we, investigate the trade-off. as N increases from 1000 to 10000, the proposed cost for the constrained cache converges to the optimal cost for an unconstrained cache size. The x-axis shows the amount of cache saving for the proposed strategy compared to the optimal average cache size for the unconstrained case. The figure illustrates that the cache saving increases with N , while the cost of the proposed policy converges to the optimal cost. This behavior demonstrates the potential of our proposed asymptotic strategy in massive cache savings. In addition, as m(N ) increases, the rate of convergence increases at the expense of having smaller savings in the cache size, as predicted by our theoretical result. In other words, smaller m(N ) result in bigger cache saving but with a slower convergence rate in cost. This is exactly the trade-off that Theorem 3 reveals for the proposed asymptotic strategy.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VII. CONCLUSION</head><p>In this work, we have proposed and investigated an increasingly important caching scenario for serving dynamically changing content. We introduced the age-of-version metric to capture the served content's freshness and track the number of stale versions per content. We have addressed the problem of developing optimal caching strategies for minimizing the system's cost which is shaped by a combination of the service cost of fetching fresh content directly from a back-end database and the aging cost of cached, potentially older, content from a front-end cache. In the scenario of constrained cache size, our analysis has revealed the interesting fact that the optimal caching strategy allocates cache space to items based solely on their popularity, while the content update rate is what determines the content holding time in the cache. Moreover, we have explored the trade-off between the cost minimization and cache savings gain of our design. In particular, not only the cost of our proposed strategy converge asymptotically to the optimal strategy as the number of data items grows, but can also reduce the cache occupancy substantially, as fully characterized by our analysis and illustrated with numerical results. APPENDIX A. Proof of Lemma 1:</p><p>The average system cost utilizing the local cache to serve the requests comprises two main terms. Average fetching cost associated with requests that are not in the cache after a miss event. And, average freshness cost associated with requests that are served from the cache after a hit event, in which case an ageing/freshness cost is incurred due to the fact that the cached content may not be the most fresh version. Then the average cost C(&#964; ) under the policy &#964; &#8712; T can be expressed as:</p><p>where &#8710; n (&#964; ) is the time average age of the data item n served from the local cache when the policy &#964; &#8712; T is implemented and Cmiss n (r) is the average cost of successful fetch per each cache miss of item n. Based on Renewal Reward Theorem, we have:</p><p>where S n,i is the area shown in Fig. <ref type="figure">2</ref> and the last equality comes from the fact that:</p><p>and N n (t) is a Poisson process with parameter &#955; n which is independent of &#964; n,i . Then noting that E</p><p>gives us the result. We omit the indices i for convenience.</p><p>Next, let us denote the steady-state hit probability under the caching policy &#964; as h n (&#964; n ) = P ( Xn (&#964; ) = 1), where Xn is the limiting distribution of X n (t) that is the indicator of whether item n is in the local cache at time t or not (cf.</p><p>(1)). Using the illustration of Fig. <ref type="figure">2</ref>, it is easy to confirm that the hit probability for content n can be expressed as:</p><p>where R n is the time until the next request of item n after its last eviction and Q n is the waiting time after each cache miss of item n before it is successfully fetched from the database. Since requests for item n arrive at the cache according to a Poisson process with rate &#946;p n , thus the interarrival times between the requests of item n are exponentially distributed. Due to the memorylessness property of the expenential distribution, R n which is the time until next request given that a certain amount of time has already passed from the last request, will still have exponential distribution with the same rate as the interarrival times. Therefore, we have E[R n ] = 1 &#946;pn . Moreover, letting F to be the number of failures before a successful fetch, since each fetch attempt is successful with probability r, F will have Geometric Distribution with its first and second moments given by:</p><p>Since after each failure we wait for q unit time and attempt another fetch, the average waiting time of Q n is given by:</p><p>Then, substituting in <ref type="bibr">(20)</ref>, and defining A n (r) = &#946;pn 1+&#946;pn( 1 r -1)q as the effective arrival request of item n, the hit probability can be given as:</p><p>Next, we calculate Cmiss n (r) which is the average cost of successful fetch per each cache miss of item n.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Cmiss</head><p>Note that since requests for item n are generated according to a Poisson Process with rate &#946;p n , therefore the number of requests for item n at any interval of length q have a Poisson with rate &#946;p n q. This results in an average number of &#946;p n q requests for item n at any waiting interval of length q. Substituting ( <ref type="formula">22</ref>) and ( <ref type="formula">21</ref>) in <ref type="bibr">(19)</ref> gives the average cost as in <ref type="bibr">(5)</ref>.</p><p>Using the hit probability given in <ref type="bibr">(21)</ref> and noting that E[ Xn (&#964; )] = h n (&#964; ), the average cache occupancy which is E</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Proof of Lemma 3:</head><p>To check that Slater condition holds for any 0 &lt; B &lt; N , assume &#964; n = A N (r) ) &#8712; F B which is a feasible point and all the inequalities are inactive.</p><p>To check the non-degeneracy assumption, we need to show that every where that a constraint is active, it's gradient is nonzero. Since constraints &#964; n &#8805; 0, &#8704;n &#8712; N have always nonzero gradient, so we only need to check this for g(&#964; ) =</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>N n=1</head><p>An(r)&#964;n An(r)&#964;n+1 -B. We have:</p><p>which is always nonzero for any feasible &#964; &#8712; F B . To check the third condition, consider &#964; &#8242; = (0, ..., 0) &#8712; F B and choose t n = c n such that c&#964; &#8712; F B for a given &#964; . Then for this choice of &#964; &#8242; and t n we can show that condition 3 holds for all &#964; &#8712; F B . To check the last condition, notice that L C (&#964; ) = &#964; &#8242; &#8712; R N : C (&#964; &#8242; ) &lt; C(&#964; ) is sub level set of the convex function C(&#964; ) and therefore is also itself a convex set.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Proof of Theorem 3:</head><p>Without loss of generality, assume that p 1 &#8805; p 2 &#8805; &#8226; &#8226; &#8226; &#8805; p N &gt; 0. Since m(N ) = |P &#945;| and according to the definition of the set of popular items P &#945; given in (17), we will have &#945; &#8804; &#946;c f p m(N ) for any given &#945; where p m(N ) is the probability of the m(N ) th most popular item. Using the expressions for &#964; * n and &#964; &#945; n given in ( <ref type="formula">8</ref>) and ( <ref type="formula">14</ref>) respectively, for dynamic data items we can show that:</p><p>Since &#964; * n &#8805; &#964; &#945; n , &#8704;n &#8712; N , applying Taylor series to average cost of the data item n will give us the following inequality:</p><p>The Lagrangian function L(&#964; &#945; n , &#945;, &#956;) of ( <ref type="formula">12</ref>) takes the form: where the second inequality comes from the fact that p n (p m(N ) -p n ) &#8804; 1 4 p 2 m(N ) . For popular static items n &#8712; S &#945;, we have &#964; * n = &#964; &#945; n = &#8734; according to ( <ref type="formula">8</ref>) and ( <ref type="formula">14</ref>) respectively. Therefore, we have Cn (&#964; &#945; n ) = C * n = 0, &#8704;n &#8712; S &#8745; P &#945;. For unpopular static items n &#8712; S &#945;, &#964; * n = &#8734; according to (8) and according to <ref type="bibr">(18)</ref> we have &#964; &#945; n = 0. This gives C * n = 0 and Cn (&#964; &#945; n ) = &#946;p n c f based on the average cost function given in <ref type="bibr">(5)</ref>. Therefore,</p><p>Thus, the total average system cost is upper-bounded as: In order to make sure that the upper bound vanishes as N increases, we need <ref type="foot">4</ref>  which demonstrates the smallest rate of convergence on the average cost. On the other hand, since m(N ) is the number of most popular items that we choose to cache while discarding all the other unpopular ones, we can show that: Recall the average cache occupancy defined in <ref type="bibr">(6)</ref> and note that according to <ref type="bibr">(18)</ref> for unpopular items we have &#964; &#945; n = 0, &#8704;n / &#8712; P &#945;. Also, according to Theorem 2, for static popular items we have &#964; &#945; n = &#8734;, &#8704;n &#8712; S &#945;. This gives: </p><p>Now, using the fact that: </p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>Accordingly, we assume that the system evolves in continuous time.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>While this linearity assumption is meaningful as a first-order approximation to ageing cost and facilitates simpler expressions in the analysis, it can also be generalized to convex forms to extend this basic framework.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2"><p>In practice, these parameters can be learned over time. Here, we assume their knowledge so that we can focus on their impact on the performance.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_3"><p>f (n) = &#969;(g(n)) means that for any real constant c &gt; 0, &#8707;n 0 &#8805; 1 : f (n) &gt; cg(n) &#8805; 0, &#8704;n &#8805; n 0 .</p></note>
		</body>
		</text>
</TEI>
