What is the function of the cache memory in a computer's memory hierarchy?
1
To provide permanent storage for data and files.
2
To store frequently used data for faster access by the CPU.
3
To control the flow of data between the CPU and memory.
4
To manage the allocation of memory resources to different programs.