How to get the `maxSize` of a cache instance?
tbontb-iaq opened this issue · 2 comments
tbontb-iaq commented
const cache = new QuickLRU({ maxSize: 10 });
/// cache.maxSize ???
When using resize
to update maxSize
, you may need to compare the new and old maxSizes.
tbontb-iaq commented
Quick job.
It can be obtained through maxSize
, but it must be set through resize
.
Is it better to define the getter and setter for maxSize
?
sindresorhus commented
Yeah, not worth removing resize
, but we could make maxSize
setter just call it internally.