Caching

Operations
Caching thumbnail

What is caching?

Definition:

A cache is a data storage layer that stores a subset of data so that future requests for that same data are served faster.

Analogy:

Caching is like checking books out at a library.

Imagine you're researching a paper at a library. To complete your assignment, you need multiple pieces of information from different books.

You check out the books and bring them home to then further research your topic rather than go back to the library every time you want to take a look at a page in the book.

In other words...

Caching (pronounced "cashing") is the process of storing data in a temporary storage area so it is more readily accessible to you as the end user.

Why is caching important?

It's one thing to know what a term means, but that is worthless if you don't know why you should know what caching is in the first place. Let's break down the importance of this tech term based on two high level categories. We'll walk through an explanation as well as provide a score, 1-10, that shows you how much you should care about caching.

Pre-Product: 2/10

The first will be if you do not have a product yet. This means that you don't have a physical product. Maybe you're in the ideation phase, or maybe you're almost ready to start development. Whichever it is, we'll get into why caching is important and why you should or shouldn't care about it if you do not have a product.

You don't need to worry too much about understanding the term "Caching" when it comes to starting a tech company. As long as you understand what caching means, you should be all set!

Live Product: 3/10

The second category is if you do have a live product. Maybe you just launched your business or maybe it's been live for years and you're continuing to improve its quality. Regardless of the scenario, if your product is live, caching carries a different weight.

Caching is a bit more relevant once your product is live because sometimes, to test new features that get released, you need to clear your browser cache. So, it is important that you understand what clearing your browser cache is doing if it is something you are instructing users to do as well.

Examples of caching

So you know what caching is, by definition. You know if you should care about it or not depending on your situation as a business/company/product. To dig in deeper, we will walk through some examples so we can make sure you really have a solid grasp on caching.

When you go on the internet, your web browser will commonly cache files or images locally that way the next time you go to the same website, it will load faster. Your web browser isn't going to store all of the information, just what it finds relevant to help things move more quickly.

Three caching memory levels:

There are three different levels of memory that can be cached. Let's walk through all three:

  1. Primary Cache - Level 1 (L1)

    This is going to be your most common type of caching and what you will interact with when your web browser stores website information to load your pages faster. The memory level of L1 is 2 KB to 64 KB.
  2. Secondary Cache - Level 2 (L2)

    The second level of caching is going to store a much larger set of data, anywhere from 256 KB to 512 KB. When searching through cached information, if the data isn't found in L1, the computer will then look into L2.
  3. Main Memory - Level 3 (L3)

    While this is the largest in memory size, from 1 MB to 8 MB, it is also the slowest.

Key Takeaways:

  1. Caching (pronounced "cashing") is the process of storing data in a temporary storage area so it is more readily accessible to you as the end user.
  2. If you don't have a product, don't worry about this term.
  3. If you do have a product, make sure you are efficiently caching the right information to strengthen your product's speed.
  4. There are three memory levels of caching: primary cache (L1). secondary cache (L2), and main memory (L3).
Not seeing a term? 🤔