Cache stats calls to prevent hammering the API

def cached_read(self, kind):
        """Cache stats calls to prevent hammering the API"""
        if not kind in self.cache:
            self.pull_stats(kind)
        if self.epochnow() - self.cache[kind]['lastcall'] > self.cache_timeout:
            self.pull_stats(kind)
        return self.cache[kind]['lastvalue']