3.2. Characteristics of Two-Level CacheTwo-level cache has static and dynamic caches, which have the following characteristics.The contents stored in the static selleckchem Wortmannin cache are relatively fixed, in addition to part of the replacement of cache replacement algorithm; the majority of its content does not change within 24 hours. The static cache is updated daily and the update is based on the query log generated every day in this cluster. After the index updates, by analyzing the query log, we can extract the hot query to allocate the data of the static cache.The data in static cache are from analyzing the query logs, which provide the hot queries and corresponding results for the static cache. By the query repeatability analysis, the popular content stored in the static cache will still be popular in the next 24 hours.
Thus, the static cache hit rate should be high; it enhances the whole cache hit rate.For static cache, the content is nearly consistent in a day, and it uses the synchronous buffer initialization strategy with the update of index. It avoids the data flow caused by keeping the data synchronization in all the cache servers.The dynamic cache acts as an adjunct to static cache, whose data change dynamically. We will record the dynamic cache, check if the buffer is full, and write caches. Otherwise, you will replace the adjustment in accordance with the replacement strategy and static cache and dynamic cache records.4. Cache Data Distribution StrategyThe cache data distribution strategy refers to how the queries and its corresponding results will be stored in the two-level cache structure cache.
The entire cache data distribution strategy includes the following content: how to calculate the hot value of every query from the query logs, during the initialization of static cache and dynamic cache, how to decide which queries and the corresponding results to be stored in the static cache, and how to replace the data in static cache and dynamic cache.The idea of the strategy is very simple. By analyzing the cache queries log, the cache system will calculate the hot value of every query. Then, the cache system will choose the top N queries sorted by their hot values. Finally, the system will put these queries and their corresponding results in the static cache. At the same time, in order to achieve further optimization expansion, the cache will also store the hot queries and their corresponding results in other clusters.
Dacomitinib This needs communication among the cache servers. During the work of the caching system, the data in the static cache and dynamic cache are updated with the cache replacement algorithm.Cache data allocation strategies can be divided into the following parts: calculating of the query log, cache data initialization, the communication between different cache servers about hot queries, and data exchange between static and dynamic caches. The cache data distribution strategy is shown in Figure 2.