A cache temporarily stores frequently accessed data to improve the speed and efficiency of data retrieval and reduce latency.