Updating java cache

Rated 3.87/5 based on 516 customer reviews

A low hit/miss ratio means that the cache is applied to data that should not be cached.Also, the low hit/miss ratio may mean that a cache is too small to capture temporal locality of data access.The main performance characteristic of a cache is a hit/miss ratio.The hit/miss ratio is calculated as number of cache hits divided by number of cache misses.

A typical interface for a Java cache provides access to the data using a unique key: A cache works as the following: An application requests data from cache using a key.Getting the same results from a cache takes about 5 microseconds on a modern 2GHz CPU. A special algorithm should be used to remove (evict) data from the cache that has low chances of access. To benefit from caching, the access to data should display properties of temporal and spatial locality.The performance improvement for this particular use scenario is 1,000,000! The data should be accessed often (temporal locality) and the probability of accessing a near cache element should be high (spatial locality).Least Recently Used (LRU) is one of the most popular among a number of eviction policies.LRU earned its popularity for being the best in capturing temporal and spatial locality of data access.

Leave a Reply