medikoo / memoizee

Complete memoize/cache solution for JavaScript
ISC License
1.73k stars 61 forks source link

What is cache size unit? #67

Closed vinayk047 closed 7 years ago

vinayk047 commented 7 years ago

In document i can not find unit of cache size limit, weather it is KB, MB etc. Please clarify that it would be very helpful.

medikoo commented 7 years ago

@vinaykharecha size is purely about how many results to cache. e.g. if max is 1000, then result will be cached only for 1000 different function calls (on LRU basis).

Library doesn't try to measure how big memory cost is behind certain cache values, but maybe at some point such feature will be introduced

medikoo commented 7 years ago

I've also improved documentation, to make that clear https://github.com/medikoo/memoizee#limiting-cache-size