cached ({ method, route, data }, done = NOOP) {
    let { cache } = this;
    const slug = `${method}-${route}-${JSON.stringify(data)}`;
    if (cache[slug]) return done(null, ...cache[slug]);
    this.request({ method, route, data }, (err, ...args) => {
      if (!err) cache[slug] = args;
      done(err, ...args);
    });
  }
/**
   * Performs an API request with caching
   */
Performs an API request with caching
Performs an API request with caching
cached ({ method, route, data }, done = NOOP) {
    let { cache } = this;
    const slug = `${method}-${route}-${JSON.stringify(data)}`;
    if (cache[slug]) return done(null, ...cache[slug]);
    this.request({ method, route, data }, (err, ...args) => {
      if (!err) cache[slug] = args;
      done(err, ...args);
    });
  }
cached ( { method , route , data } , done = NOOP ) { let { cache } = this ; const slug = ` ${ method } ${ route } ${ JSON . stringify ( data ) } ` ; if ( cache [ slug ] ) return done ( null , ... cache [ slug ] ) ; this . request ( { method , route , data } , ( err , ... args ) => { if ( ! err ) cache [ slug ] = args ; done ( err , ... args ) ; } ) ; }
Performs an API request with caching
Performs an API request with caching