ElI5 why is the ‘cache’ this all powerful crasher of apps and causer of problems? Why does clearing it fix things?

649 views

ElI5 why is the ‘cache’ this all powerful crasher of apps and causer of problems? Why does clearing it fix things?

In: 101

22 Answers

Anonymous 0 Comments

Imagine you land the excellent job of being clerk at a library. You’re in luck, it is a huge library! People come to your desk and queue up to ask for a particular book, so you go and get it for them. Some books take longer to fetch than others (big library has downsides!).

You notice that the queue can get long and you’re constantly busy fetching books, often the same book that happens to be popular! To save yourself time and speed things up for your clients you put a box on your desk, you give it the funky name of ‘cache’ but it’s just a box really, to put things in.

In that box you put copies of the currently popular books, so when people come and ask for it you hand it to them real quick. It works great!

Now it can cause problems, what if lots of books are popular and you keep piling more books in the box. Eventually it’ll be extremely heavy and your desk is struggling to hold it. Better limit the size of your box.

Or a new revision of a popular book came out but your box is full out of outdated copies! Oh no now you give your clients an old copy and they want the new. Better empty that box and go and fetch latest.

Replace the library with your app/site and the books are the content you see as a user of that app. A cache speeds up delivery and reuse.

You are viewing 1 out of 22 answers, click here to view all answers.