Cache vs Buffer

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Cache vs Buffer相关的知识,希望对你有一定的参考价值。

缓存 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的主要内容,如果未能解决你的问题,请参考以下文章

Spark cache vs broadcast

Alpine Dockerfile --no-cache Vs 的优势。 rm /var/cache/apk/*

System.Runtime.Caching.MemoryCache vs HttpRuntime.Cache - 有啥区别吗?

内存列式存储 vs Buffer Cache

从 Spark Cache VS 数据库中检索数据缓慢

Http <link type="prefetch" vs. pragma: no-cache