A simple memory cache using buffers and byte limits
const cache: BufferCache<number, TestingType> = new BufferCache([[{ id: 1 }]], {
ttl: 1,
maxByteSize: 900,
resizeStrategy: 'LARGEST',
});
Able to choose between removing largest, first, last of the cache.