Skip to content

Commit f831377

Browse files
committed
improve readme
1 parent ed5ac4d commit f831377

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const datasource = new (class MoviesAPI extends HTTPDataSource {
5151
super(baseURL, {
5252
pool,
5353
clientOptions: {
54-
bodyTimeout: 100,
55-
headersTimeout: 100,
54+
bodyTimeout: 5000,
55+
headersTimeout: 2000,
5656
},
5757
requestOptions: {
5858
headers: {
@@ -98,6 +98,7 @@ const datasource = new (class MoviesAPI extends HTTPDataSource {
9898
'X-Foo': 'bar',
9999
},
100100
requestCache: {
101+
maxCacheTimeout: 50 // In case of the cache does not respond for any reason (ms).
101102
maxTtl: 1000 * 60 * 10, // 10min, will respond for 10min with the cached result (updated every 10min)
102103
maxTtlIfError: 1000 * 60 * 30, // 30min, will respond in an error case with the cached response (for further 20min)
103104
},
@@ -117,6 +118,10 @@ const datasource = new (class MoviesAPI extends HTTPDataSource {
117118

118119
The http client throws for unsuccessful responses (statusCode >= 400). In case of an request error `onError` is executed. By default the error is rethrown in form of the original error.
119120

121+
## Benchmark
122+
123+
See [README.md](benchmarks/README.md)
124+
120125
## Production checklist
121126

122127
This setup is in use with Redis. If you use Redis ensure that limits are set:
@@ -126,4 +131,4 @@ maxmemory 10mb
126131
maxmemory-policy allkeys-lru
127132
```
128133

129-
This will limit the cache to 10MB and removes the least recently used keys from the cache when the cache hits the limits.
134+
This will limit the cache to 10MB and removes the least recently used keys from the cache.

0 commit comments

Comments
 (0)