We consider a variant of the online caching problem where the items exhibit dependencies among each other: an item can reside in the cache only if all its dependent items are also in the cache. The dependency relations can form any directed acyclic graph. These requirements arise e.g., in systems such as CacheFlow (SOSR 2016) that cache forwarding rules for packet classification in IP-based communication networks. First, we present an optimal randomized online caching algorithm which accounts for dependencies among the items. Our randomized algorithm is $O( \log k)$-competitive, where $k$ is the size of the cache, meaning that our algorithm never incurs the cost of $O(\log k)$ times higher than even an optimal algorithm that knows the future input sequence. Second, we consider the bypassing model, where requests can be served at a fixed price without fetching the item and its dependencies into the cache -- a variant of caching with dependencies introduced by Bienkowski et al. at SPAA 2017. For this setting, we give an $O( \sqrt{k \cdot \log k})$-competitive algorithm, which significantly improves the best known competitiveness. We conduct a small case study, to find out that our algorithm incurs on average 2x lower cost.
翻译:我们考虑在线缓存问题的一个变体,其中缓存项之间存在相互依赖关系:一个缓存项仅当所有依赖项也同时位于缓存中时,才能被缓存。依赖关系可以构成任意有向无环图。这些需求出现在诸如CacheFlow(SOSR 2016)等系统中,该系统用于缓存基于IP通信网络中数据包分类的转发规则。首先,我们提出了一种考虑缓存项间依赖关系的最优随机在线缓存算法。我们的随机算法具有$O(\log k)$竞争比,其中$k$是缓存大小,这意味着即使与预知未来输入序列的最优离线算法相比,我们的算法所需代价也不会高出$O(\log k)$倍。其次,我们考虑旁路模型,在该模型中,请求可以通过固定代价直接服务,而无需将缓存项及其依赖关系装入缓存——这是Bienkowski等人在SPAA 2017中提出的带依赖关系缓存的变体。针对该场景,我们给出了一种$O(\sqrt{k \cdot \log k})$竞争比的算法,显著改进了已知的最佳竞争比。通过小型案例研究,我们发现该算法平均可降低2倍的代价。