Skip to content

Buffer vs cache vs queue

A buffer smooths throughput between two endpoints, a cache stores for reuse, a queue decouples producer and consumer with its own worker model.

Aspect

Buffer

Cache

Queue

Purpose

Smooth flow

Store for reuse

Decouple producer/consumer

Who reads

One consumer

Many readers

Workers

Eviction

Drained

LRU/TTL

Ack-based

Lifetime

Milliseconds

Minutes/hours

Until processed

Example

Socket buffer

HTTP cache

SQS