DEV Community

Cover image for Web Caching Explained by Buying Milk at the Supermarket

Web Caching Explained by Buying Milk at the Supermarket

Kevin Kononenko on June 26, 2018

If you have ever bought milk at the supermarket, then you can understand server-side and browser-side caching. If you are an avid internet user (y...
Collapse
 
ben profile image
Ben Halpern

I can't look at supply chains without thinking caching. Being really into caching as a dev and having studied some of the supply stuff in school, I see this stuff everywhere.

BTW, this is a pretty interesting post on these concepts:

The Cuban CDN

Collapse
 
kbk0125 profile image
Kevin Kononenko

Wow! Yeah definitely a physical representation of caching. Did not know that still happened in the year 2016, hopefully that has changed in last 2 years.

Collapse
 
taggervng profile image
tag hatle

I'd heard a much more rudimentary version of this analogy but the way you broke it down made the bigger picture really clear! I like that you covered both server and browser caching, things make more sense now. Thanks for this explanation!

Collapse
 
kbk0125 profile image
Kevin Kononenko

Very welcome Tag :)

Collapse
 
thomasbnt profile image
Thomas Bnt

Great post ! Your explication with the milk/farm is awesome, it helps a lot to understand how the cache works.

Collapse
 
kbk0125 profile image
Kevin Kononenko

Thanks Thomas!

Collapse
 
kurilenkostacy profile image
Stacy Kurilenko

Thank you for the great article. We’ve at Alconost got so inspired that we’ve translated it into Russian so that our non-English speaking colleagues can read it too habr.com/company/alconost/blog/416...

Collapse
 
yechielk profile image
Yechiel Kalmenson

Wow! Great analogy!

Collapse
 
adhrinae profile image
Ahn Dohyung

This is a great article! I feel ashamed how much I didn't know about caching as a web developer.
May I translate this article into Korean and share to other developers in Korea?

Collapse
 
kbk0125 profile image
Kevin Kononenko

Yep go ahead. Please credite CodeAnalaogies for the original article and link back to it: blog.codeanalogies.com/2018/06/11/...

Collapse
 
adhrinae profile image
Ahn Dohyung

Sure thing! :)

Collapse
 
otacke profile image
Oliver Tacke

What's pasteurization in this analogy? ;-)

Collapse
 
kbk0125 profile image
Kevin Kononenko

Haha, gonna need to think about that one :)

Collapse
 
morinoko profile image
Felice Forby

Awesome! I was totally confused about caching before, but this makes is so easy to understand. Thanks!

Collapse
 
heatherhaylett profile image
Heather

I know this was written a while ago, but still doing a great job of explaining caching!

Collapse
 
prodev42 profile image
prodev42

I like this.