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

633 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

Say you’re trying to call a friend. You recall their number from memory, dial it in, and find that it doesn’t work. You try again, and it still doesn’t work. Maybe it’s a problem with their phone, the service, or some other factors, but all you know is that you’re dialing the correct number that you remember, the same way you’ve done hundreds of times before, and it’s not connecting.

At some point you decide to find their contact info. This takes some time since you don’t use your contacts app that often and aren’t even sure where it is on your home screen, and discover that they in fact changed their number, meaning you have to call them using the new one.

In this example your memory is the cache. It’s a fast way of retrieving information for a given task, at the risk of potentially being out of date or otherwise no longer correct. Web browsers and other applications follow a similar process – Loading data from the internet every time for something that’s not likely to change very often is inefficient, so these programs ‘remember’ what the data is and simply load it from RAM or disk when needed provided it hasn’t been too long since the last update. Usually this is configured in such a way that your program should always have the latest data when it needs it, however if the app misconfigured its cache policy it can lead to situations similar to the example above.

Clearing the cache effectively forces your program to get the up-to-date data before proceeding, as slow as it may be, fixing your version of the app.

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