Eli5: What is cached data?

618 views

Eli5: What is cached data?

In: Technology

8 Answers

Anonymous 0 Comments

It depends what the application is. If you’re talking about your web browser, that’s easy. Cached data is data stored on your computer. For example, when you view a website, your computer has to download the images and scripts and styles and your user data like your personal settings. Instead of re-downloading all that data every time you load a page from that website, your web browser saves a copy some of that data on your computer. The web page loads faster that way. If you’re talking about a phone app or pc application, the cache acts similarly. It’s just commonly used data that is prepared and ready for the application to access as it needs to. It could be stored in cache because it takes a lot of processing to produce that data or it’s sensitive data that you don’t want to store permanently.

Anonymous 0 Comments

You have some data on the network somewhere, but fetching it takes time. If you know that you’ll have to access this data several times, and it doesn’t change often, you fetch it once and keep it someplace easy to reach (memory, browser cache) until you no longer need it. This is cached data.

Anonymous 0 Comments

It helps to launch apps faster, basically the data is preserved somewhere so when you reopen the app the images dont need to be downloaded again, they’re like already there.

Anonymous 0 Comments

Think of it as when you have your card in your hand before getting to check out. Websites save data , so the next time you visit it doesn’t have to go through all that again . It helps make the website load faster next time

Anonymous 0 Comments

Imagine having a cake with many layers. Each layer above gets smaller and smaller. Obviously the top layer will be the fastest to eat, as it’s the smallest.

Now imagine storage for data. Typically the data stored at the bottom tier (hard drives) is slow. If you move up one step, to the next *cake*, you have the RAM. It’s smaller, it’s faster. Finally you have the top layer of *cake* which is cache. It’s the smallest and fastest.

If you need to process data quickly or often, it’s best to move it to the smaller, faster areas.

This isn’t a perfect analogy, as it’s not just a matter of size. But the idea remains the same.

Anonymous 0 Comments

Well, son, every day last year, you told me that you want to see your mommy, daddy, your uncles and aunties, grandpas and grandmas all together at the same time.

This was a hard thing to give you. Grandpa Rick and grandma Betty live far away in Canada. Uncle Donald is under house arrest for repeated public indecency. Auntie Karen is always fighting with her boyfriend Man Ager.

I had to spend a lot of time and effort to get us all together for your birthday yesterday, and so I took this picture that I want you to have. A picture of all of us together and happy.

This picture is like cached data, it preserves the result of a complicated process that you often asked of me. You can now look at it with very little effort and all it takes is a little bit of space on your nightstand.

Anonymous 0 Comments

Imagine you work at the local corner store and one of the services you offer is telling people what the weather forecast is for the day. When your first customer comes in and asks what they weather is you have to go into the office and check the internet. When you get back you tell them that it’s currently 70F, will reach 85F at noon and might rain at 4pm.

Now as other customers come in and ask the same question, you’d waste time going back and checking the forecast for each one as it’s unlikely to change any time soon so you just repeat what you already know: 70F, 85F at noon, rain at 4pm. It may not be exactly right, but it’s close enough.

That’s what caching is, re-using data that may be old or out of date. Caching can help speed up access to data provided that real-time accuracy is not required. In the example above, nobody is really going to care if the current temp is actually 72F instead of the 70F you told them and getting the real data would be slow because you have to have the customer wait while you walk back to the office and load up the current forecast. Just telling them what you saw earlier is quick and easy.

Eventually the cached data gets to be too inaccurate and you have to check the real data again. This is known as the expiry time or time-to-live (TTL). For example, you might decide that you need to look at the forecast again after an hour so you’d say your weather cache has a 1-hour TTL.

Anonymous 0 Comments

Cached data is application data that is temporarily stored in an easily-accessible location to improve performance. The idea is that an application that uses this data can access it from the cache rather than retrieve it again from the original source, in order to save time, bandwidth, or some other resource.

For example if you have a weather app on your phone, if it needed to get weather data from an online weather service every time you open it, it’s going to take time to load and consume your mobile data. But it doesn’t need live weather data updated to the second. Instead when you open the app it will load the weather data from a local copy, the cache, and only update the cache if it is more than 1 hour old.

There’s lots of different types of cache. A hard drive will use cache to make reading and writing small bits of data faster. A CPU has cache inside to store the result of calculations it will need later, or to get the next instruction ready to execute. Browsers use cache to store images or other resources from websites you frequent so you don’t always need to re-download them every time you visit the page.