1. 程式人生 > >Cache vs Buffer

Cache vs Buffer

new however caching ren not 寫入 ever form radi

緩存 VS 緩沖

寫出 VS 寫入

The terms "buffer" and "cache" tend to be used interchangeably; note however they represent different things.

A buffer is used traditionally as an intermediate temporary store for data between a fast and a slow entity. As one party would have to wait for the other affecting performance, the buffer alleviates this by allowing entire blocks of data to move at once rather then in small chunks. The data is written and read only once from the buffer. Furthermore, the buffers are visible

to at least one party which is aware of it.


緩沖:可整塊移動緩沖區數據,緩沖區數據只能讀寫一次,讀寫的某一方能感知到緩沖區的存在

A cache on the other hand by definition is hidden and neither party is aware that caching occurs.It as well improves performance but does that by allowing the same data to be read multiple times in a fast fashion.


緩存:緩存區對雙方是不可感知的,可以多次讀寫

A further explanation of the differences between two can be found here.

出處:spring-cache

Cache vs Buffer