Image for Cache replacement policy

Cache replacement policy

A cache replacement policy governs how a computer decides which data to remove from its limited cache memory when it needs to make space for new data. Think of it like a small storage box: when it’s full and you want to add something new, you must decide which old item to discard. Common strategies include "Least Recently Used" (removing the item not accessed for the longest time) and "First In, First Out" (removing the oldest item first). The goal is to maximize efficiency by keeping the most useful data readily accessible.