krishnan.log blog

Cache-w nut

15 August 2023

Cache

A cache stores frequently requested info to serve future requests faster.

Caches are life-savers. Actually if you are googling how to do a CPR in an emergency situation, they can literally be life-savers as well. But usually, they save your business by serving users quickly.

A cache is a store of information with high-speed accesss. Database queries tend to be slower because they scan through a huge number of records compared to caches which are usually small. So when “the nation wants to know” the cricket score, the website just has to query the cache.

Humans too?

I suppose the human brain too has something analogous to a cache. A place where you store thoughts like what you had for lunch and what things you have to do for the day. The cache also has an eviction policy based on time and usage because I certainly don’t remember what I had for lunch this day last week. But I believe some things stay longer without purpose and reason.

If I were to ever hear a person say “marco”, my instant response would be to say “polo”. Or when I hear someone tell me to “turn 360 degrees”, I would instinctively ask if they mean 180 degrees. Guess I really am a “cashew” nut.

PS: Yes, I wrote a whole blog post just so I could use this pun.