Level 1 or L1 cache is special, very fast memory built into the central processing unit (CPU) to help facilitate computer performance. By loading frequently used bits of data into L1 cache, the computer can process requests faster. Most computers also have L2 and L3 cache, which are slower than L1 cache but faster than Random Access Memory (RAM).
When we request programs or files from a standard platter hard drive, the device must search the internal disks for the information by sliding a head mechanism across the platters, roughly analogous to the way a needle reads a phonograph record. However, in the case of a disk drive, there are multiple platters and the head is magnetic, reading at a very high rate of speed. Nevertheless, the standard hard drive is the slowest storage device on the computer, compact disk drives aside.
We normally think of RAM as being quite fast because it is so much faster than hard drives. RAM is a temporary holding area that becomes active when the computer boots. Computers commonly have 1-4 Gigabytes (GB) of RAM. By loading frequently requested programs, files, pictures and other items into RAM, the computer doesn’t have to search the hard drive(s) to retrieve the information on subsequent requests.
While this is a good strategy, the CPU can work faster than RAM, and to speed things along, you might think of L1, L2 and L3 cache as the go-betweens that anticipate what requests will be made of RAM, holding that data at the ready. When a request comes, the CPU checks L1 cache first, followed by L2 and L3 cache (if present). If the CPU finds the requested data in cache, it’s a cache hit, and if not, it’s a cache miss and RAM is searched next, followed by the hard drive. The goal is to maximize hits and minimize misses that slow performance.
While L1 cache is built into CPUs today, it might also reside alongside the CPU on older PCs. L2 cache can be built into the CPU or present on the motherboard, along with L3 cache. In some cases L3 cache is also being incorporated into the CPU. Unlike RAM, cache is not expandable.