Browse Source

Readme tweaks

master
Sindre Sorhus 7 years ago
parent
commit
9cbb464351
  1. 7
      readme.md

7
readme.md

@ -332,6 +332,7 @@ request.catch(err => {
request.cancel();
```
<a name="cache-adapters"></a>
## Cache
@ -355,7 +356,7 @@ const map = new Map();
Got uses [Keyv](https://github.com/lukechilds/keyv) internally to support a wide range of storage adapters. For something more scalable you could use an [official Keyv storage adapter](https://github.com/lukechilds/keyv#official-storage-adapters):
```
npm install @keyv/redis
$ npm install @keyv/redis
```
```js
@ -367,9 +368,9 @@ const redis = new KeyvRedis('redis://user:pass@localhost:6379');
got('todomvc.com', {cache: redis});
```
Got supports anything that follows the Map API so it's easy to write your own storage adapter or use a third-party solution.
Got supports anything that follows the Map API, so it's easy to write your own storage adapter or use a third-party solution.
For example, the following are all valid storage adapters
For example, the following are all valid storage adapters:
```js
const storageAdapter = new Map();

Loading…
Cancel
Save