What is a Cache?

Software Engineering Word of the Day

Cache

/kæʃ/

Definition

We like things fast. Fast loading speeds can make or break a user's experience for movies, games, and websites. If you ever wondered how engineers achieve this speed, using a cache is almost always part of the answer.

A cache is a small, high speed data layer that exists in between a source of data and the client it needs to serve. It's like a refrigerator that stores your food and allows for quick access. It would take much longer for you to make your meal if you had to travel to the grocery store every time you needed an ingredient. In a same way, the cache provides the same close and quick access to systems to bring the same performance enhancing benefits.

Used in a sentence

Example 1: Tester doesn't see the new changesTester: Hey, I've been told the feature has been deployed but I'm not seeing it on staging.Lead Dev: Make sure the clear your cache, it's probably outdated.

Example 2: Website is taking too long to load.Dev: Our servers are overloaded with requests so performance has been really slow.Devops: We'll add a cache to relieve the burden and get some of the performance back.

Commonly used terms related to Cache

  • Browser Cache

  • Expiration

  • RAM

  • Write Through/ Write Around/ Write Back

  • Lazy Load