nodeshift / opossum

Node.js circuit breaker - fails fast ⚡️
https://nodeshift.dev/opossum/
Apache License 2.0
1.32k stars 107 forks source link

Incorrect default value of maxEntries for MemoryCache #904

Closed IvanPenga closed 2 weeks ago

IvanPenga commented 3 weeks ago

Added in opossum version 8.2.0, if cacheSize property is not provided to MemoryCache constructor, it will default to 2 ^ 24 - 1, which is 21, because caret (^) operator is bitwise operator, not exponentiation operator. This should be replaced with ** operator, or Math.pow function.

daan944 commented 3 weeks ago

That's my bad, sorry. Fixed it in PR

lholmquist commented 2 weeks ago

fix is in the newly released 8.3.1