Resizing LRU-cache

285 Views Asked by At

I am using LRU-caching package for caching string data. Based on current heap size of V8, I need to change the size of the cache, but this package doesn't provide such kind of interface. I need to achieve this in optimal way(not copying the whole memory) or find package which provides such kind of functionality.

1

There are 1 best solutions below

0
On

Looks like it does see: https://github.com/isaacs/node-lru-cache/blob/master/lib/lru-cache.js#L41

which should allow you to simply do cache.max = newMaxValue;