What does it mean by cold cache and warm cache concept

cachefilesystems

I read a paper and it used terms “cold cache” and “warm cache”. What does it mean by cold cache and warm cache concept? I visit this but I need something more.

Best Answer

Well, in short: a warm cache is useful whereas a cold cache is not. In fact, a cold cache can be dangerous to use.

You see, the whole point of a cache is to keep oft-accessed data accessible. For instance a DNS cache will store locally the results of the name-resolutions that you've requested recently, and, when those same resolutions are requested again their results are already available and served immediately without querying a larger, likely off-site name database. In other words your computer doesn't have to ask your internet service provider's domain name server for the ip address to google.com because your computer already knows it - your DNS cache is warm.

But if you never request google's ip then it won't be in your cache. A cold cache is either too stale to be useful - as in the data it contains is likely too old to be accurate - or it is entirely empty, and empty's plenty cold.

But often empty is better than old - though this is highly dependent, of course, on the data that is being cached. Empty's easy to handle because it just needs filling - that's a no-brainer - but old caches require error-correction. This is the primary logistical problem of developing and maintaining cache systems - how can you know the data you've cached is up to date and what is done if it isn't?

I won't be answering either of those questions - they're both implementation dependent and probably far and away beyond my capability, anyway - but it should be understood that all caching systems come with some inherent risk of inaccuracy. It goes with the territory. The risk may not be great - often it is only a risk of a few extra nanoseconds in processing time. The cache system will check requested data against whatever failsafe has been implemented by the cache designer and, if it's found wanting, then the cache system will, for instance, query the ISP's DNS for google's ip and all is well.

The warmer the cache, though, the less there is risked. The warm cache's benefits of keeping dear data near outweigh the risks of the cold cache's drawbacks or... probably you shouldn't be caching.

Related Question