What is a cache?

what is a cache and how can we use it in web development?

Angelo Poole
1 min readAug 29, 2020
Photo by Markus Winkler on Unsplash

A cache is a blank area of storage on your computer that is typically used to store temporary data on your computer, The way that we use caches in web development it typically to store variables or data about something that could be time-consuming to continue to fetch such as images, videos, music and the like.

A common misconception with a cache is that it is used in the same way as a cookie would be when it's not. A cookie is used to store information about the end-user while a cache would be to store longer time-consuming pieces of data. This does not stop you from placing user information in the cache, you can definitely use it to pull in user information but it's against web design principals. Also do remember that all cache methods are asynchronous and should be dealt with using async-await.

When using a cache you are in charge of data cleanup for your end-user as to not clutter their device, remember that you are downloading resources onto the end-users device.

--

--

Angelo Poole

Software engineer, Graduate of Flatiron school. Currently volunteering! Looking to talk to fellow engineers, please send me a message!