Browse Source

Pass TTL to cache

cache-clone-stream
Luke Childs 8 years ago
parent
commit
1843cbaf48
  1. 3
      index.js

3
index.js

@ -92,7 +92,8 @@ function requestAsEventEmitter(opts) {
}
}
};
opts.cache.set(key, value);
const ttl = response.cachePolicy.timeToLive();
opts.cache.set(key, value, ttl);
});
} else if (revalidateCache) {
const key = cacheKey(opts);

Loading…
Cancel
Save