Skip to content

v5.0.0

Compare
Choose a tag to compare
@szmarczak szmarczak released this 09 May 17:39
· 33 commits to master since this release
  • Rewrite main logic (#31) 6f799a8
    • Dropped HostsResolver in favor of the new DNS resolution system.
      From now on, it will use dns.lookup(...) for hostnames that only exist on the OS-side.
      You can modify the duration via the fallbackDuration option. By default it's set to 3600 (1 hour).
    • Added support for Map-compatible instances.
      For example, you can pass an instance of QuickLRU as the cache option.
    • Updating cacheable.servers no longer triggers cacheable.updateInterfaceInfo().
      Instead, it clears the cache directly.
    • Removed cacheable.tick() in favor of the new mechanism to remove outdated entries.
      It's just an unreffed Timeout.
    • Calling cacheable.updateInterfaceInfo() will now only clear the cache on interface removal.
      For example, when your IPv4 interface has disconnected.
    • Up to +400k op/s performance increase when compared to previous version of cacheable-lookup.
    • Fixed docs (finally!).