Search code examples
cachingwarm-up

What is meant warm cache?


What is meant by running the program in warm cache?

Can someone be kind enough to explain.

Does warm cache imply..the cache which when queried gives a cache hit?


Solution

  • A cache works by having previously loaded and remembered the requested piece of data.

    When a cache is initialized, it is empty. So the first access for any given piece of data will result in a cache-miss and take more time than one would wish.

    Warming the cache means executing code right after startup that loads stuff into the cache before the program needs it "for real" (so that is already there when an end-user uses the application).

    This is similar to athletes doing stretching exercises to warm up their muscles before they need them for the competition.