Tennu / tennu

IRC Bot Framework for Node.js
https://tennu.github.io/
ISC License
78 stars 14 forks source link

Cache Whois Lookups #74

Closed Havvy closed 8 years ago

Havvy commented 8 years ago

Issue: Various middlewares together will call isIdentifiedAs which does a whois. That whois isn't saved, so it performs the whois multiple times.

Solution: Caching. Naively, we could just cache for 1 second.

Havvy commented 8 years ago

I just need to write two more tests (that from what I can tell, should pass with flying colors), and then decide whether I want to change whois(nickname: string, server: boolean, opts: Object) to whois(nickname: string, opts: Object) or not. That change is backwards incompatible, but I haven't see anybody actually use the server boolean yet.

Havvy commented 8 years ago

Fixed. Decided not to do the backwards incompatible thing here.