Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 330 Bytes

README.md

File metadata and controls

17 lines (12 loc) · 330 Bytes

buffer-cache

A simple memory cache using buffers and byte limits

Usage

const cache: BufferCache<number, TestingType> = new BufferCache([[{ id: 1 }]], {
  ttl: 1,
  maxByteSize: 900,
  resizeStrategy: 'LARGEST',
});

Resize strategy

Able to choose between removing largest, first, last of the cache.