Both cache and buffer are temporary storage areas but they differ in many ways.
The buffer is mainly found in ram and acts as an area where the CPU can store data temporarily, for example, data meant for other output devices mainly when the computer and the other devices have different speeds. This way the computer can perform other tasks.
- store data temporarily
- between devices which have different speeds
- used for input/output processes
- buffer is only a section of the ram
- example: keyboard typing
Cache is a high-speed storage area that can be part of the main memory or some other separate storage area like a hard disk. These two methods of caching are referred to as memory caching and disk caching respectively.
- high-speed storage area
- two methods
- main memory area: memory caching
- storage area: disk caching
- used during reading and writing processes from the disk
- Cache is a high-speed storage area while a buffer is a normal storage area on ram for temporary storage.
- Cache is made from static ram which is faster than the slower dynamic ram used for a buffer.
- The buffer is mostly used for input/output processes while the cache is used during reading and writing processes from the disk.
- Cache can also be a section of the disk while a buffer is only a section of the ram.
- A buffer can be used in keyboards to edit typing mistakes while the cache cannot.