apollo-datasource-http
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -16,4 +16,4 @@ "use strict"; | ||
return { | ||
async get(key) { | ||
return await cache.get(key); | ||
get(key) { | ||
return cache.get(key); | ||
}, | ||
@@ -30,4 +30,4 @@ clear() { | ||
}, | ||
async set(key, value, ttl) { | ||
return await cache.set(key, value, { | ||
set(key, value, ttl) { | ||
return cache.set(key, value, { | ||
ttl, | ||
@@ -34,0 +34,0 @@ }); |
{ | ||
"name": "apollo-datasource-http", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"author": "Dustin Deus <deusdustin@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -87,2 +87,6 @@ # Apollo HTTP Data Source | ||
}, | ||
requestCache: { | ||
maxTtl: 1000 * 60 * 10, // 10min, will respond for 10min with the cached result (updated every 10min) | ||
maxTtlIfError: 1000 * 60 * 30, // 30min, will respond in an error case with the cached response (for further 20min) | ||
}, | ||
}) | ||
@@ -89,0 +93,0 @@ } |
Sorry, the diff of this file is not supported yet
23731
120