szmarczak / cacheable-lookup

A cacheable dns.lookup(…) that respects TTL :tada:
MIT License
193 stars 29 forks source link

fix: allow destroying a cache instance #78

Open nordfjord opened 1 year ago

nordfjord commented 1 year ago

Currently the cache instance creates an interval under the hood and there's no way to clear this interval. This effectively results in memory leaks when e.g. running a jest test suite where each suite creates a cache instance.

asnawisaharuddin commented 1 month ago

I face the same issue