The Fetcher class is instantiated for each person that we want to
lookup data for, which meant that previously we were making an http
request to fetch lookup.json for every person.
This change makes it so that the lookup is at the class level, so is
only fetched on the first call and then cached for subsequent calls.
The
Fetcher
class is instantiated for each person that we want to lookup data for, which meant that previously we were making an http request to fetch lookup.json for every person.This change makes it so that the lookup is at the class level, so is only fetched on the first call and then cached for subsequent calls.
Fixes https://github.com/everypolitician/wikidata-fetcher/issues/33