Skip to content

Commit f03357c

Browse files
authored
specify ttl in seconds
1 parent d234a10 commit f03357c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ const datasource = new (class MoviesAPI extends HTTPDataSource {
109109
'X-Foo': 'bar',
110110
},
111111
requestCache: {
112-
maxTtl: 1000 * 60 * 10, // 10min, will respond for 10min with the cached result (updated every 10min)
113-
maxTtlIfError: 1000 * 60 * 30, // 30min, will respond with the cached response in case of an error (for further 20min)
112+
maxTtl: 10 * 60, // 10min, will respond for 10min with the cached result (updated every 10min)
113+
maxTtlIfError: 30 * 60, // 30min, will respond with the cached response in case of an error (for further 20min)
114114
},
115115
})
116116
}

0 commit comments

Comments
 (0)